@ -15,23 +15,24 @@ substitutions:
scl_pin : GPIO22
sda_pin : GPIO21
- platform : template
name : "Auto-Adjust Brightness"
id : switch_autobrightness
icon : mdi:brightness-auto
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:
switch:
- platform : template
name : "Auto-Adjust Brightness"
id : switch_autobrightness
icon : mdi:brightness-auto
restore_mode : RESTORE_DEFAULT_ON
lambda : |-
id(aab_enable) = false;
if (id(aab_enable)) {
return true;
} else {
return false;
}
turn_on_action:
lambda : |-
id(aab_enable) = true;
turn_off_action:
lambda : |-
id(aab_enable) = false;
globals:
# aab = auto-adjustable brightness
@ -53,7 +54,7 @@ external_components:
- source:
type : git
url : https://github.com/lubeda/EspHoMaTriXv2
ref : release
ref : main
refresh : 60s
components : [ ehmtxv2 ]
@ -98,6 +99,7 @@ logger:
level : WARN
api:
services:
- service : tune
variables:
tune : string
@ -249,7 +251,7 @@ ehmtxv2:
url : https://user-images.githubusercontent.com/16407309/224850723-634c9b2d-55d9-44f2-9f93-765c0485b090.gif
on_next_screen:
- homeassistant.event:
event : e hmtxv2 .new_screen
event : e sphome .new_screen
data_template:
iconname : !lambda "return x.c_str();"
text : !lambda "return y.c_str();"