-
Notifications
You must be signed in to change notification settings - Fork 804
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
Add val_tpl on HA discovery configuration - fix issue #939 #941
Conversation
thanks for the proposal, |
This is an interesting point, it all started here. In short:
With more context: without the "val_tpl" no automatism will change the state of the switch, even if a "pl_on" is defined (and it is equal to the value) and even if on the MQTT topic we receive the update from "the real switch". So, in the end, we have a switch created by discovery that forces me into constraints (the "pl_on") and it is always stationary ( so... in my opinion just confusing and it is useless). On the other hand, there is no info on pl_off, but is present the cmd_t that indicate how to change the state... so finally all are free to switch manually the sensor to something that is "on" (as specified on "pl_on") or not "on" ( so.... it can be just off). If I were to look at the configuration without the "val_tpl" (according to the point of view) it is useless. If I try to interpret this "sensor", by giving the value "val_tpl", it clearly becomes the modelling of the sensor that provide triggers. The sensor provide just the "event on" and is up to listener reset the trigger. Open to discuss it! |
ok, I see, maybe it could be nice to add to the docs (integrate/home assistant) your script that you are using with this PR so as to set the status to OFF? |
ok! |
Thanks, could you rebase from development branch please |
done |
@1technophile let me stop this PR, I just discovered that this configuration create a lot of error on home assistant, because sometime the value is not present and on home assistant is raised a lot of warning and error
|
fix issue #939