appdaemon
appdaemon copied to clipboard
Climate widget cannot turn on/off
I put a climate widget on a dashboard... and I can control the temperature. Ok, but I can't turn on/off my air conditioner by the dashboard.
I'm using appdaemon 4 - 0.7.1 by HA integration.
my air conditioner is controlled by smartIr integration climate:
- platform: smartir name: XX unique_id: XX device_code: 1400 controller_data: XX temperature_sensor: XX
the climate widget doesnt have an on/off setting. to have on/off also available you will need to add the same entity also as switch widget.
climate entities are very diverse, thats why there is chosen for such an basic approach.
I did that, I've created a new widget with the same entity with switch type, but the behavior is weird. It's necessary to click 2 or 3 times to turn it on and 2 times to turn it off. Example:
- 1º click: the air conditioner turn on, but the icon doesn't change;
- 2º click: nothing happen;
- 3º click: the icon change to green;
- 4º click: the air conditioner turn off, but the icon doesn't change;
- 5º click: the icon change to black;
thats odd behaviour. please check in home assistant what happens after each click.
also check if it also happens on a different browser/device.
Inside the logbook there are 2 actions: Air changed to Cool by Supervisor 07:45:34 - 4 hours ago
Air turned off by Supervisor 07:45:58 - 4 hours ago
I've tried in two different browsers. note: I'm using a customized basejavascript folder
is there another log to check?
try it on a PC or laptop preferably with google chrome. the javascript widget should not have any effect at all.
but what i asked you to look at: click once > go to home assistant, look at the state and compare it with the dashboard. repeat that process.
what i need to know is if home assistant and the dashboard are out of sync.
The first time I've tried from my laptop with google chrome and the behavior is the same.
I can tell that I have several switches and all of them work well and are synchronized with HA. I made some tests now, and I realize that I made mistake. The behavior that needs 2 clicks is only to turn on. To turn it off one click is enough.
Another thing that I realized:
-
If I turn it on by voice or HA dashboard doest not update de switch icon on AppDaemon dashboard;
-
If I turn it off by voice or HA dashboard the switch icon is updated on the AppDaemon dashboard;
Maybe the AppDaemon does not understand that "cool" is "on" ?
indeed a switch can only have 2 states, on and off. as soon as there is another state nothing will happen. thats why i asked you to look at the state from HA ;) so when cool is also an option then you cant use a switch, then you will need an input_select (and maybe a template input_select in HA)
thanks. It's work!