Using Elgato StreamDeck to control climate temperature

Hello there
I’m using Elgato StreamDeck Plus (the one with dials) and want to use it in conjunction with the Homeassistant Add-On to control the temperature of my climate device in my Home Assistant Core on Raspberry PI (Tuya integrated).
So far I got everything working with changing the climate modes and turning it off and on.

The only thing I don’t get to work is to increase or decrease the climate with the dial of the Streamdeck.

The description is as follows:

Available options

temperature Target temperature.

target_temp_high High target temperature.

target_temp_low Low target temperature.

hvac_mode HVAC operation mode.

Available variables

{{ ticks }} - The number of ticks the dial was rotated (negative value for left turn, positive value for right turn).

{{ rotationPercent }} - A number between 0 and 100 that represents the rotation percentage value of the dial.

{{ rotationAbsolute }} - A number between 0 and 255 that represents the absolute rotation value of the dial.

Dial rotation tick multiplier (x1)

Each tick of the dial will be multiplied with this value. This results in faster or slower value changes.

Dial rotation tick bucket size (300 ms)

If greater than zero, ticks are aggregated for the given amount of milliseconds and then passed to your service call. This results in less service calls. A value of zero will result in a service call for each tick, which may cause trouble with home assistant.

The only way to make it do anything at all is setting the service data JSON to the following:

{
  "temperature": {{ ticks * 10 }}
}

However turning the dial one “tick” isn’t doing anything, turning it about 5 or more ticks I can then hear a beep from the climate and the temperature goes to random values (atleast seems like that to me).
Maybe it’s interpreting the ticks as a certain number and setting the temperature to the number.
I often get the temperature to values of 17 or 30(max limit) when turning the dial only to the right and starting from 22.

Do I have to change it so that I’m not using the climate entity but instead call a script?

I don’t know how to write that though, since it needs to understand if the knob has been turned left or right.

Does anybody know how to solve this or maybe already has a solution at hand?

Hi there!

Today I’ve been trying the same thing and got some results to share.
As you said, there are 3 variables:

  • Ticks: the number of ticks done will be assigned to the variable. That means that if you set the “Dial rotation tick bucket size” to 1000 ms (1s) and you rotate 10 ticks the dial during that second… your temperature will be set to 10. I don’t recomend that option as it can be a nightmare to set the desired temperature.

  • rotationPercent: it applies that percent you have move (both negative and positive) to the current variable value. It is the one I use and as I am not using the dial that much I have set the “Dial rotation tick bucket size” to 0ms (inmediate).

  • rotationAbsolute: it works the same as “rotationPercet” but it is between 0 and 255 so… more difficult to adjust. I use “Dial rotation tick multiplier” x0.1 and this option would make increases and decreases to temperature in an interval of 0.255 degrees.

TLDR:

{
  "temperature": {{rotationPercent}}
}
Dial rotation tick multiplier (x0.1)
Dial rotation tick bucket size (0ms)

It is my first contribution to the forum :smiley: but I suppose that any like to the post is appreciated.

Hope everything is solved, have a good tinkering!!!

1 Like

As I continued playing around I realised that there is one problem with the plugin. When you change the Stream Deck + screen (you change profile or something else), the value is resetted and you have to start the rotation from 0 degrees.

After hard research (it was not that easy), I visited the creator’s github and there is a Discussion about that from 3 days ago. He just wrote that the solution would be hard to implement in the plugin but that there is a work around for the templating.

The solution is to use the raw option. If interested, you can find the post here Github Discussion.

PS: with this config now I use the ticks variable.

Thank you for sharing your find.

The profile thing could explain why it seemed so random to me.

I will try it out later today, but it looks very promising to use it with the raw option.