My apartment is heated by electric radiators, and I have them all under the control of Home Assistant. It all works perfectly, but of course it needs the use of my iPad, phone or computer if I want to make adjustments during the day to the temperature.
I have long wanted to have a thermostat in the main room which did not require opening HA on another device, and I purchased the Shelly X2 Wall Display with some misgivings about being able to use it as a thermostat. I made the purchase because I knew there was an HA integration, but I knew this didn’t necessarily mean that I could get the Shelly thermostat element to work as desired.
In the event, it does the job perfectly. Once the thermostat is enabled on the Shelly, the HA integration helpfully creates a climate device, which sits alongside the other climate devices which I use to control the heating in various sections of the apartment. All that I needed to do was to create an automation which passed values from the main room climate device to the Shelly, and vice-versa. Now, if I nudge the set point up on the Shelly display, it updates the thermostat on the HA system just as if I had used the app on my iPad. Likewise if I nudge the set point on my iPad or browser, it updates the Shelly.
It was slightly tricky to find the right format for the template values, so I am including my two automations here to help out if anybody else finds this a struggle.
- id: '1764591734770'
alias: Shelly thermostat sync
description: ''
triggers:
- trigger: state
entity_id:
- climate.shellywalldisplay_00a90b53e559
attribute: temperature
conditions: []
actions:
- action: climate.set_temperature
metadata: {}
data:
temperature: '{{state_attr(''climate.shellywalldisplay_00a90b53e559'',''temperature'')}}'
target:
entity_id: climate.downstairs_area
mode: single
- id: '1764608047622'
alias: Shelly thermostat backsync
description: ''
triggers:
- trigger: state
entity_id:
- climate.downstairs_area
attribute: temperature
conditions: []
actions:
- action: climate.set_temperature
metadata: {}
data:
temperature: '{{state_attr(''climate.downstairs_area'',''temperature'')}}'
target:
entity_id: climate.shellywalldisplay_00a90b53e559
mode: single
I should mention that there is one drawback. If the Shelly thermostat is NOT enabled, the relay is available as a switch or button, and I had originally wanted it to switch a light on or off. However, with the thermostat enabled, the switch is reserved for the control of a heating device. Thus if a light is connected it turns on when the Shelly thinks a heating device needs to be on and off when it isn’t. It is therefore not usable as an independent switch for other purposes. I don’t understand this, because I would have thought that my case is not unique in using a separate relay under HA control (Aqara in my case, but it could be Shelly relay), and the display’s relay should be available for other purposes where it is not needed to directly control a heating device. If anybody knows a work-around, or if I have overlooked something in the Shelly documentation, please do let me know!
