Can someone help me?
I want to reset the rotary encoder value in ESPHOME. when another entity has a vertain value. Purpose is to set the rotary encoder value to 0 when an endstop, measured with reed relais on GPIO34, shows an enstop.
I tried the presented method, but I receive the error "mapping values are not allowed here"
Here is the snipped of my yaml file:
Inputs
binary_sensor:
- platform: gpio
pin: GPIO34
name: "GS Input DPIO34"
id: GS_Input_GPIO34
device_class: door
on_value_range:- above 0.5
below 1.5
then- sensor.rotary_encoder.set_value:
id: GS_Rotary_Encoder
value: 0
- sensor.rotary_encoder.set_value:
- above 0.5
- platform: gpio
pin: GPIO35
name: "GS Input DPIO35"
id: GS_Input_GPIO35
device_class: door
sensor:
- platform: rotary_encoder
name: "GS Rotary Encoder"
id: GS_Rotary_Encoder
pin_a: GPIO13
pin_b: GPIO14
on_clockwise:- logger.log: "Turned Clockwise"
on_anticlockwise: - logger.log: "Turned Anticlockwise"
filters: - or:
- throttle: 30s
- delta: 10
- logger.log: "Turned Clockwise"