My Thermostat displays all the available attributes in climate.home but I want to control one attribute without having to display the whole card, is there anyway to do this in lovelace? I specifically want to switch between the attributes available in operation_mode preferably from a dropdown list or toggle button. Please help? I run Hassio in docker if that helps.
Oh wow, thanks for the reply, I will go through it and try.
The attributes available to my climate platform are the following. I want to switch between ‘operation_mode’ for ‘heat’ and ‘off’ or if thats not possible, maybe a dropdown with all modes. I also tried the template switch but not able to understand where to define the ‘heat’ and ‘off’ attributes as well as ‘service’ parameter. My goal is to get a native switch to turn on and off the thermostat without fiddling with the temperature.
current_temperature: 24.6
min_temp: 7
max_temp: 35
temperature: 24
target_temp_high: null
target_temp_low: null
fan_mode: auto
fan_list: auto,on
operation_mode: heat
operation_list: auto,auxHeatOnly,cool,heat,off
hold_mode: null
away_mode: off
aux_heat: off
actual_humidity: 42
fan: off
climate_mode: Home
operation: idle
climate_list: Sleep,Home,Awake,Away
fan_min_on_time: 15
friendly_name: Climate
supported_features: 3575
How dumb of me to not read the climate platform documentation before trying to reinvent the wheel! I didn’t even know this thing existed.
So my climate has services for climate.set_operation_mode and climate.set_away_mode among the other typical services like set temperature, can I set it up into a binary switch? Or would I need template switch to achieve that?
Try this. The service calls work in my heating automation and I tested the value_template in my setup with the template dev tool. Haven’t testing this all together but it should work. Let me know if you have issues.
Thanks for that. I tried it and it immediately threw errors for the double double quotes on value_template and I fixed that but now the switch stays on and does not switch off. I can turn it off but it turns back on again. ANy idea?
Is your climate named climate.home in the states list? You need to replace climate.downstairs with your climate.XXXXXX to make the template work. And the service calls for that matter.
Mine is set to the corresponding state attribute and the button does show up as on(since my heat is running) but when i toggle it off, it turns back on in a second or two. I’m lost at this point.
At the moment, the newly created switch acts as a reflection of the heating status only. I cannot toggle it but when I turn cooling on or switch the thermostat off, the switch toggles to off but would not let me toggle back on, but it turns on when I switch the thermostat back to heat. Any other approaches you can suggest me ?
If it was the set_operation_mode missing the underscore you are talking about, I had it fixed when you provided the first snippet as I couldnt get the config test to pass.
Oh wait, now it started working! Thank you very much!
Post your config, looks like you may have climate_mode specified under data?
The last config I posted works in my setup and is a copy and paste from my config file. I turned it on and off a number of time and watched the thermostat turn from heat to off.