cgiesche / streamdeck-homeassistant

Control your Home Assistant devices from StreamDeck
MIT License
805 stars 39 forks source link

Setting relative temperature for climate #160

Closed simplemal closed 1 year ago

simplemal commented 1 year ago

Hello to everyone, working with climate element, you can read the actual temperature in label like this Temp: {{temperature}}°

also in label, you can easily add or subtract to that temperature, like {{temperature+1}} and works fine.

But seems not works when you try the same operation in Data JSON for the service "Set temperature", like this

{ "temperature" : "{{temperature+1}}" }

Do I have wrote something wrong in code or is it an actual limitation?

The final goal is having buttons to increase or decrease the temperature for baby steps, starting to the actual.

Thank you in advance

cgiesche commented 1 year ago

Hi,

this is a limitation. The data json is currently static, so no variables are evaluated. This may change, but not soon :/

cgiesche commented 1 year ago

Maybe you can implement what you want by creating a script in homeassistant and call that instead of the "Set temperature" service.

simplemal commented 1 year ago

Maybe you can implement what you want by creating a script in homeassistant and call that instead of the "Set temperature" service.

good idea, thanks

cgiesche commented 1 year ago

I tried if it works as i would expect, and at least calling a script works fine. image image

(if you see all entities in the drop down and not only scripts - that is a bug that will be fixed with the next release. Until then you have to search...)

simplemal commented 1 year ago

yes, I see the list, thanks