Skip to content

Commit

Permalink
add unit encoder c package
Browse files Browse the repository at this point in the history
  • Loading branch information
landonr committed Sep 12, 2023
1 parent 2d032e7 commit 841c35d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions common/UnitEncoderC.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
UnitEncoderC:
id: encoder_base
i2c_id: bus_a
button:
name: "${friendly_name} Rotary Button"
id: rotary_button
internal: True
on_press:
then:
- lambda: |-
id(homeThingMenu)->buttonPressSelect();
encoder:
name: "${friendly_name} Rotary Encoder"
id: rotary
internal: True
encoder_filter: 2
on_clockwise:
- lambda: |-
id(homeThingMenu)->buttonPressWakeUpDisplay();
id(homeThingMenu)->rotaryScrollClockwise(id(rotary).state);
on_anticlockwise:
- lambda: |-
id(homeThingMenu)->buttonPressWakeUpDisplay();
id(homeThingMenu)->rotaryScrollCounterClockwise(id(rotary).state);

0 comments on commit 841c35d

Please sign in to comment.