The host is using the Shelly TRV together with an external Shelly H&T temperature sensor but at 15:40 the host says that you can hook up any external temperature sensor via HTTP GET(?) to the Shelly TRV but this does not get explained any further.
**What I want looks like this. So to send the current temperature from my external temperature sensor to the Shelly TRV as http://192.168.0.165/ext_t?temp=measured t°C
I have an external temperature sensor via BTHome in Home Assistant which I want to “export” via HTTP GET.
Change SHELLYTRVURL to your shelly’s local url and sensor.temperature to the sensor where you want to get your temperature from.
Make sure to restart home assistant in order to load the new rest service. Then you need to add an automation where you execute this rest command when the temperature changes:
alias: "Update ShellyTRV temp when temp changes"
description: ""
trigger:
- platform: state
entity_id:
- sensor.temperature
condition: []
action:
- service: rest_command.send_temp_to_shellytrv
data: {}
mode: single
One hint: I wrote send_temp_to_shellytrv-01 instead of send_temp_to_shellytrv_01 and got an error message while checking configuration.yaml (home assistant Invalid config for rest_command]: invalid slug Got OrderedDict). So don’t use “-” but “_” instead.
And one question: Do I have to enable " Enable external temperature corrections endpoint http://192.168.178.182/ext_t?temp=measured t° on the shelly webpage for that TRV?
alias: Temperatur an ShellyTRV
description: Daten der externen Temperatursensoren an die TRVs senden
trigger:
- platform: time_pattern
minutes: /1
condition: []
action:
- service: rest_command.send_temp_to_shellytrv_kueche
data: {}
mode: single
In the Shelly Menu i have activated the checkbox with “Enable external temperature corrections endpoint http://192.168.178.163/ext_t?temp=measured t°”
I see that you use a double slash after the IP address.
I used the correct syntax, but I can not get home assistant to update the external temperature. The option is enabled on the TRV and I have tested that I can set it manually with a static temperature with the API.
Many thanks for this snippets @halfcat , it works perfectly and permits to use the TRV in combination with the floor heating and an external sensor under control of HA!
But in the end I found that the automatically generated generic thermostat from the Shelly Integration was not up to the task (no configurable values for min and max) so I wrote my own generic thermostat. But still it was worth it, as it is nice to have the correct values on the TRV while in the Shelly App.
I would do that in the automation by adding a condition. Please do check you sensor and what it reports when it is unavailable. If for example the sensor has an identify button state of “unavailable”, you could add this condition:
condition: not
conditions:
- condition: state
entity_id: button.temperature
state: unavailable