Skip to content
This script updates Z-Wave thermostat entity state and current temperature from external sensor
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
python_scripts
.gitignore remove custom_updater support, black format Aug 19, 2019
LICENSE Initial commit Jun 29, 2019
README.md Update README.md Nov 13, 2019
hacs.json Prettier Sep 4, 2019
info.md Update readme Sep 23, 2019

README.md

Thermostat Update

GitHub Release hacs_badge Community Forum Buy me a coffee

This script updates Z-Wave thermostat entity (e.g. Danfoss 014G0013) state and current temperature from external sensor in the Home Assistant.

This script use Home Assistant python_script component.

You can install this script via HACS or just download thermostat_update.py file and save it in /config/python_scripts folder.

Go to HA community for support and help.

Configuration example

- id: update_thermostats
  alias: 'Update Thermostats'
  trigger:
    platform: state
    entity_id:
      - climate.thermostat_kitchen
      - climate.thermostat_bedroom
      - climate.thermostat_bathroom
      - sensor.temperature_kitchen
      - sensor.temperature_bedroom
      - sensor.temperature_bathroom
  condition:
    condition: template
    value_template: >-
      {% if "thermostat" in trigger.entity_id and trigger.to_state.attributes.current_temperature == none %}
         true
      {% elif "sensor" in trigger.entity_id %}
         true
      {% else %}
         false
      {% endif %}
  action:
    service: python_script.thermostat_update
    data_template:
      heat_state: 'auto'
      idle_state: 'idle'
      idle_heat_temp: 10
      thermostat: >-
         {% if "thermostat" in trigger.entity_id %}
            {{ trigger.entity_id }}
         {% else %}
            climate.thermostat_{{ trigger.entity_id | replace('sensor.temperature_', '') }}
         {% endif %}
      sensor: >-
         {% if "sensor" in trigger.entity_id %}
            {{ trigger.entity_id }}
         {% else %}
            sensor.temperature_{{ (trigger.entity_id | replace('climate.thermostat_', '')) }}
         {% endif %}

Configuration example for state only update

- id: update_thermostats
  alias: 'Update Thermostats'
  trigger:
    platform: state
    entity_id:
      - climate.thermostat_kitchen
      - climate.thermostat_bedroom
      - climate.thermostat_bathroom
  action:
    service: python_script.thermostat_update
    data_template:
      heat_state: 'auto'
      idle_state: 'idle'
      idle_heat_temp: 10
      thermostat: '{{ trigger.entity_id }}'

Script arguments

key optional type default description
thermostat False string thermostat entity_id
sensor True string sensor entity_id
heat_state True string heat name of heating state, changing this from default value will broke compatibility with HomeKit
idle_state True string off name of idle state, changing this from default value will broke compatibility with HomeKit
idle_heat_temp True float 8 temperature value between idle and heat states
state_only True boolean false with state_only set to true script will update only state of the thermostat
temp_only True boolean false with temp_only set to true app will update only current_temperature of the thermostat
You can’t perform that action at this time.