From 747de376a5afe945d4e850b5ab0a22b50c422415 Mon Sep 17 00:00:00 2001 From: "Andrew J.Swan" Date: Wed, 1 Nov 2023 21:09:43 +0200 Subject: [PATCH] 2023.9.1: Add Night mode switch to Readme --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 5b6e5b02..d1e8d327 100644 --- a/README.md +++ b/README.md @@ -1306,6 +1306,24 @@ switch:         id(rgb8x32)->set_display_off(); ``` +#### Night mode switch + +```yaml +switch: +  - platform: template +    name: "$devicename Night Mode" +    icon: "mdi:weather-night" +    restore_mode: ALWAYS_OFF +    lambda: |- +      return id(rgb8x32)->night_mode; +    turn_on_action: +      lambda: |- +        id(rgb8x32)->set_night_mode_on(); +    turn_off_action: +      lambda: |- +        id(rgb8x32)->set_night_mode_off(); +``` + ### automatic brightness Awtrix and PixelIt have hard-coded functionality. EHMTX is also capable of building something like that with lambdas. Feel free to expierement as you see fit. See the Ulanzi simple YAML as a guide.