-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New HAss Discovery (3/4): INPUTS #7901
Conversation
- Bump version to 8.1.0.11 - Add HAss Discovery support for Button and Switch triggers by Federico Leoni (#7901)
@effelle What's the reason to force a switchtopic to have them discovered in HA? That topic isn't used. Because this change (from 8.1.0, which was not on the change list) made me search for quite some time... 😢 |
@septillion-git if you look on SwitchTopic meaning the switches will be independent. Is not a new feature in Tasmota, on the contrary was and still is the official way to decouple switches from power devices (relays) from a long time, so definitely nothing new. Having the switches/buttons created in Home Assistant without decoupling them was a bug, a not intended feature, and the change was decided in conjunction with HA devs as a preliminary support for the new mqtt triggers now completely implemented. About the change list, perhaps you looked in the wrong version? If you need more assistance please address your requests to our Tasmota Support Discord Chat, thanks! |
@effelle thank you very much for this lengthy explanation! And when reading the next piece, don't get me wrong! I really appreciate all the hard work. But this is just my view as a user. I didn't know it used to be a "bug". I run Tasmota on them since 7.something and I'm sure the documentation was in line back then. Aka, all the time the switches where visible in HA. And I simply decoupled them by making a rule for them as was explained in the documentation. And I toggled that rule based on So for me as a user is all looked like it was meant to be. For me as a user documentation and function where in line with switches discovered. #7901 was indeed mentioned in the change list of 8.2.0 but I would have never ever guessed (without reading the whole PR) that it would change the discovery of switches in HA. Aka, for me it came as a huge breaking change. And you say " remembering that is a setting born for this type of configuration". But I don't get why. You now make a new topic to post the state to but that topic isn't used by HA discovery (luckily!) yet that is the toggle to make switches discoverable. To me, And I say luckily because the way I now fixed it is to set the same And yeah, I would like to help more with the code itself but the whole project is pretty daunting! Getting an overview of where to find what and how things are dealt with (storing of settings, hooks etc) is kind of impossible. At least for a hobbyist like me. A page with general info like that would be great. But again, not a negative comment. I know it's one of the least exiting things to make and can be pretty hard and time-consuming. So from time to time I might take a new dive into the code. |
No problem Timo, I like to have feedbacks. I understand your point of view about the Discovery and as I said the good news is I want to change switches to something similar of what I've done with buttons, mostly to re-add the ability to use rules in conjunction. The bad news is there is no ETA, because it involves a change on base code. |
Description:
Add support for
triggers
under Home Assistant for automation control. Available starting from version 0.106.6.Tasmota is the first firmware using those new triggers.
More information about Triggers here and there.
What's new:
1. Buttons:
ButtonTopic
must be set to1
or a custom name;SetOption1
,SetOption11
andSetOption13
are now supported;ButtonTopic 1
, a Button can only generate aHOLD
trigger.2. Switches:
SwitchTopic
must be set to a custom name;SwitchMode
type are available but 11 and 12 will generate just aTOGGLE
trigger;Binary_Sensor
;Trigger
;HOLD
and double click are now supported;SwitchMode
can have abinary_sensor
and atrigger
at the same time (ex Switchmode 5).Also:
3. New environmental sensors added:
SGP30
,CCS811
andSCD30
.4. Updated some units of measure.
5. Code optimization.
A special note: Thanks to @emontnemery for help in understanding how to add the new triggers and also to @arendst for the quick implementation of new functions necessary to optimize the code.
Related issue (if applicable): fixes #7599 , #7837 and #7848
Checklist: