Hi,
can someone spot the error? It doesn’t pass the output it should.
It’s my first automation, so there is probably something that I have misunderstood.
- id: Heat Pump On Off
alias: Heat Pump On Off
trigger:
platform: state
entity_id: binary_sensor.heating_allowed
action:
service: modbus.write_register
data:
hub: hub1
unit: 1
address: 25
value: >-
{% if is_state('binary_sensor.heating_allowed', 'On') %}
1
{% else %}
0
{% endif %}