1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 03:12:20 +01:00

Add on_clockwise and on_anticlockwise triggers to rotary encoder (#1330)

This commit is contained in:
Jesse Hills
2020-11-02 06:24:26 +13:00
committed by GitHub
parent e4636b99f7
commit 20dd744680
4 changed files with 52 additions and 1 deletions

View File

@@ -586,6 +586,10 @@ sensor:
- sensor.rotary_encoder.set_value:
id: rotary_encoder1
value: !lambda 'return -1;'
on_clockwise:
- logger.log: "Clockwise"
on_anticlockwise:
- logger.log: "Anticlockwise"
- platform: pulse_width
name: Pulse Width
pin: GPIO12