The automation seems to be correctly in the Development tools - Template but entity: fan.cooling didn't take it. can anyone see my error here?
- id: cr10_cooling_fan
alias: "CR-10 Cooling Fan Speed"
trigger:
- platform: template
value_template: "{{ states ('sensor.3d_printer_fan_speed') | int > 0 }}"
action:
- service: fan.set_percentage
data_template:
entity_id: fan.cooling
percentage: "{{ states ( 'sensor.3d_printer_fan_speed') }}"
Please use proper formatting with the </> in the menu bar
fix it. Thanks
I wonder is it a proper calling?
states ('sensor.3d_printer_fan_speed')
I mean a whitespace.
I don't think it's matter. as you can see in the result percentage which return proper value, 25.
I did change service: fan.turn_on then It works but only once.
- Do not use a “code” formatting for a non-code part of your post.
- Have you checked with Dev tools - Services to confirm that your call is correct?
action only trigger once time when fan speed has new value from 0, after that action don’t execute unless fan speed reset back to zero and slide to new number.
Yes, that’s how a template trigger works, when the template changes from false to true.
You probably want a state trigger:
trigger:
- platform: state
entity_id: sensor.3d_printer_fan_speed