PR "geekofweek:patch-1" and issue #4

pull/6/head
LuBeDa 3 years ago
parent 5fe63f2d3a
commit 131f126ac8

@ -554,6 +554,7 @@ namespace esphome
} }
EHMTX_queue *screen = this->find_icon_queue_element(icon); EHMTX_queue *screen = this->find_icon_queue_element(icon);
screen->icon_name = iconname; screen->icon_name = iconname;
screen->icon = icon;
screen->text = text; screen->text = text;
screen->endtime = this->clock->now().timestamp + lifetime * 60; screen->endtime = this->clock->now().timestamp + lifetime * 60;
screen->screen_time = screen_time; screen->screen_time = screen_time;

@ -1,5 +1,5 @@
substitutions: substitutions:
devicename: devicename: ulanzi
ledpin: GPIO32 ledpin: GPIO32
buzzerpin: GPIO15 buzzerpin: GPIO15
friendly_name: LED Matrix friendly_name: LED Matrix
@ -17,22 +17,22 @@ substitutions:
switch: switch:
- platform: template - platform: template
name: "Auto-Adjust Brightness" name: "Auto-Adjust Brightness"
id: switch_autobrightness id: switch_autobrightness
icon: mdi:brightness-auto icon: mdi:brightness-auto
restore_mode: RESTORE_DEFAULT_ON restore_mode: RESTORE_DEFAULT_ON
lambda: |-
if (id(aab_enable)) {
return true;
} else {
return false;
}
turn_on_action:
lambda: |-
id(aab_enable) = true;
turn_off_action:
lambda: |- lambda: |-
if (id(aab_enable)) { id(aab_enable) = false;
return true;
} else {
return false;
}
turn_on_action:
lambda: |-
id(aab_enable) = true;
turn_off_action:
lambda: |-
id(aab_enable) = false;
globals: globals:
# aab = auto-adjustable brightness # aab = auto-adjustable brightness

Loading…
Cancel
Save