Last active
November 21, 2020 21:43
-
-
Save artkrz/2fa58aadfb36f8aded81631a90997190 to your computer and use it in GitHub Desktop.
TS0601 calibration based on remote sensor.
This file contains 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
- alias: Heating office calibrate temperature | |
trigger: | |
platform: state | |
entity_id: sensor.multisensor_office_temperature | |
condition: "{{ (states('sensor.multisensor_office_temperature')|float - state_attr('climate.thermostat_office_climate','current_temperature')|float)|round(1,'half') != 0 }}" | |
action: | |
- service: mqtt.publish | |
data_template: | |
topic: 'zigbee2mqtt/thermostat_office/set/local_temperature_calibration' | |
payload_template: >- | |
{% if (states("sensor.multisensor_office_temperature")|float - state_attr("climate.thermostat_office_climate","current_temperature")|float)|round(1,"half") >= 0 %} | |
{{ (states("sensor.multisensor_office_temperature")|float - state_attr("climate.thermostat_office_climate","current_temperature")|float)|round(1,"half") }} | |
{% else %} | |
{{ 128 - (states("sensor.multisensor_office_temperature")|float - state_attr("climate.thermostat_office_climate","current_temperature")|float)|round(1,"half")|abs }} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment