[solved] How do you set Target temperature on the Shelly TRV?

I see that you can manually set the target temperature in the dashboard, but as far as I can see the options in the automation only allow you to set a valve position, or to turn the radiator on or off.

Is it possible to set a target temperature an an automation? If so, how?

I’m no HA expert - very new to things so haven’t even figured out my own setup yet, but … the Shelly TRV’s have rich API control, including setting valve position.

I currently use a different automation platform - and I have this such that when the room temp falls below a set-point, it fires up the boiler and fires the Shelly API to set the valve position to 100 (Percent). When the room reaches the set point, it does the opposite and fires the Shelly API to set the valve position to 0 (percent).

I’m not sure how comfortable you are with API’s etc … and their use in HA … but the Shelly end-points are well documented here; API Reference

… but basically the end point would be a GET http://[your TRV IP Address]/thermostats/0?pos=100

where the parameter of “pos=X” is the desired valve position … so if your TRV was assigned to an IP address of 192.168.1.123 (and of course, you want to make sure this is a static IP) … then you’d use;

GET http://192.168.1.123/thermostats/0?pos=100 to open the valve fully, and http://192.168.1.123/thermostats/0?pos=0 to close it.

My assumption is that you could (and this is what I’m considering) set up a rest service in Home Assistant, and find a way to trigger this when the heat demand needs it.

That said, I think setting a target temp of the maximum value (which I think is 30 or 31 degrees C?) . and minimum value (not sure what this is … 5’c?) would probably achieve the same thing in practice.

This now available using the “set_temperature” service.

service: climate.set_temperature
data:
  temperature: [desired temperature]
  hvac_mode: auto
target:
  area_id:
    - [your area name]

I have set mine to 10C if nobody is in the room for 30 minutes, then to 19C if someone goes into the room.