mirror of
https://github.com/randybb/esphome-configs.git
synced 2026-12-06 09:06:52 +01:00
m5core2: Unit LCD invert and sleep switches
This commit is contained in:
1 parent
7cef9c674d
commit
a7215bdef9
1 file changed
+21
@@ -302,6 +302,27 @@ key_collector:
|
||||
on_progress: *line_progress
|
||||
on_result: *line_result
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
name: Unit LCD Invert
|
||||
icon: mdi:invert-colors
|
||||
optimistic: true
|
||||
restore_mode: RESTORE_DEFAULT_OFF
|
||||
entity_category: config
|
||||
on_turn_on:
|
||||
- lambda: id(unit_lcd).set_invert(true);
|
||||
on_turn_off:
|
||||
- lambda: id(unit_lcd).set_invert(false);
|
||||
- platform: template
|
||||
name: Unit LCD Sleep
|
||||
icon: mdi:sleep
|
||||
optimistic: true
|
||||
restore_mode: ALWAYS_OFF
|
||||
on_turn_on:
|
||||
- lambda: id(unit_lcd).set_sleep(true);
|
||||
on_turn_off:
|
||||
- lambda: id(unit_lcd).set_sleep(false);
|
||||
|
||||
text_sensor:
|
||||
- platform: template
|
||||
id: keyboard_line
|
||||
|
||||
Reference in new issue
Block a user