I have danfoss 014G0013 with homekit component. This model of danfoss thermostat not raporting current temperature and state so i use this python_script:
https://github.com/bieniu/home-assistant-config/blob/master/python_scripts/thermostat_update.py
Setting this without current temperature from external sensor (now i don’t have sensor for current temperature) so state_only set to true (as in the description). In automatons i have this to run script:
# run script updating thermostats
- id: heating_update_thermostats
alias: 'Heating Update Thermostats'
trigger:
platform: state
entity_id:
- climate.thermostat_sypialnia
- climate.thermostat_salon_lewy
- climate.thermostat_salon_prawy
condition:
condition: template
value_template: "{{ trigger.to_state.state == 'unknown' }}"
action:
service: python_script.thermostat_update
data_template:
thermostat: '{{ trigger.entity_id }}'
state_only: true
# run script updating thermostats on HA starts
- id: heating_update_thermostats_at_start
alias: 'Heating Update Thermostats At Start'
trigger:
platform: event
event_type: zwave.network_ready
action:
- service: python_script.thermostat_update
data:
thermostat: climate.thermostat_sypialnia
state_only: true
- service: python_script.thermostat_update
data:
thermostat: climate.thermostat_salon_lewy
state_only: true
- service: python_script.thermostat_update
data:
thermostat: climate.thermostat_salon_prawy
state_only: true
In HA and homekit it seems that everything works but I have an error log:
Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/homekit/type_thermostats.py", line 245, in update_state
if isinstance(target_temp, float) and current_temp < target_temp:
TypeError: '<' not supported between instances of 'NoneType' and 'float'