From a7215bdef9b660a475e0173656d0070291ae438e Mon Sep 17 00:00:00 2001 From: Roman Priesol Date: Tue, 3 Nov 2026 09:59:03 +0100 Subject: [PATCH] m5core2: Unit LCD invert and sleep switches --- mcu-m5core2.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/mcu-m5core2.yaml b/mcu-m5core2.yaml index 66384bb..b1f02a9 100644 --- a/mcu-m5core2.yaml +++ b/mcu-m5core2.yaml @@ -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