Hi everyone,
I’m testing a fan and the trigger on_turn_off doesn’t seem to work. on_turn_on works however.
I tested all different possibilities I know - see in the code below. None of them is working.
Does someone see the problem here?
fan:
- platform: speed
output: ${devicename}_fan_output
name: ${devicename}_fan
id: ${devicename}_fan
speed_count: 100
on_speed_set:
- sensor.template.publish:
id: ${devicename}_dashboard_helper_fan_speed
state: !lambda 'return(id(${devicename}_fan).speed);'
on_turn_off:
- sensor.template.publish:
id: ${devicename}_dashboard_helper_fan_speed
state: !lambda 'return 0;'
- sensor.template.publish:
id: ${devicename}_dashboard_helper_fan_speed
state: 0.0
- sensor.template.publish:
id: ${devicename}_dashboard_helper_fan_speed
state: !lambda 'return 0.0;'
- id(${devicename}_dashboard_helper_fan_speed).publish_state(0.0);