Last active
October 20, 2025 22:38
-
-
Save JakeCowton/314b1a4bf33934a556ab71952c8a4461 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| blueprint: | |
| name: Universal TRV External Temperature Control | |
| description: > | |
| This automation allows any TRV (Thermostatic Radiator Valve) to use temperature readings from an external sensor. | |
| Whenever the temperature sensor reports a new value, it is sent to the TRV's external temperature input for more accurate climate control. | |
| **Requirements:** | |
| - Your TRV must have a number entity to set the external temperature value | |
| domain: automation | |
| source_url: "https://gist.github.com/JakeCowton/314b1a4bf33934a556ab71952c8a4461" | |
| input: | |
| external_temp_sensor: | |
| name: External Temperature Sensor | |
| description: Select the temperature sensor that will provide temperature readings to the TRV. | |
| selector: | |
| entity: | |
| filter: | |
| domain: sensor | |
| device_class: | |
| - temperature | |
| trv_external_temp_input: | |
| name: TRV External Temperature Input | |
| description: Select the number entity that sets the external temperature value on the TRV. | |
| selector: | |
| entity: | |
| filter: | |
| domain: number | |
| stop_on_unavailable: | |
| name: Stop Updates When Sensor Unavailable | |
| description: If enabled, stops updating the TRV when the external sensor becomes unavailable or reports invalid values. | |
| selector: | |
| boolean: | |
| default: true | |
| mode: single | |
| max_exceeded: silent | |
| variables: | |
| external_temp_sensor: !input external_temp_sensor | |
| trv_external_temp_input: !input trv_external_temp_input | |
| stop_on_unavailable: !input stop_on_unavailable | |
| trigger: | |
| - trigger: state | |
| entity_id: !input external_temp_sensor | |
| action: | |
| # Check if external temperature sensor is available | |
| - if: | |
| - condition: template | |
| value_template: >- | |
| {{ stop_on_unavailable and ( | |
| is_state(external_temp_sensor, "unavailable") or | |
| is_state(external_temp_sensor, "unknown") or | |
| states(external_temp_sensor) in ['', none]) }} | |
| then: | |
| - action: system_log.write | |
| data: | |
| level: warning | |
| message: "External temperature sensor {{ external_temp_sensor }} unavailable. Skipping TRV update." | |
| logger: Universal TRV External Temperature | |
| - stop: External temperature sensor unavailable | |
| # Set the external temperature value | |
| - action: number.set_value | |
| data: | |
| value: "{{ states(external_temp_sensor) | float(0) | round(1) }}" | |
| target: | |
| entity_id: "{{ trv_external_temp_input }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment