automation:
- alias: Write Servo Value to ESP
trigger:
platform: state
entity_id: input_number.servo_control
action:
# Replace livingroom with the name you gave the ESP
- service: esphome.rc522_control_servo
data_template:
level: '{{ states(''input_number.servo_control'') | int }}'