I have a servo glued to the power button of my air conditioner, which is hooked up to a Wemos D1 Mini flashed with ESPHome’s servo component. I want to be able to click a button on my dashboard that will call an automation that will simply turn the servo to 85% momentarily then back to 75%. All the automation needs to do is change the value of the number entity ‘servo_control’.
Right now I have a number entity called servo_control which is being affected by a slider (and works) but is too cumbersome to slide the slider to 85% then quickly down to 75% to turn off or on the AC. This is what I have so far for the automation but it does nothing.
lovelace button code
type: button
tap_action:
action: call-service
service: automation.trigger
service_data:
entity_id: automation.airconditionertoggle
in the automations.yaml file
automation:
- alias: AC Press
trigger:
entity_id: automation.airconditionertoggle
action:
service: number.set_value
entity_id: number.servo_control
value: 75 %