just need a few pointers on how to format a lambda call to check when its gone 7pm to turn off a led sign ive made.
things ive tried so far
text_sensor:
- platform: template
id: onoff
lambda:
if (id(sntp_time).now().hour > 19 {
light.turn_off: sign_light;
return id(print_status).state = "Off";
} else {
id(Daytime).execute();
return id(print_status).state = "on";
}
update_interval: 1s
-text sensor - above (wouldn’t compile)
also
time:
- platform: sntp
# ...
on_time:
- seconds: 0
minutes: 0
hours: 7
days_of_week: MON-SUN
then:
- script.execute:
id: Daytime
brightness: 50
- seconds: 0
minutes: 0
hours: 19
days_of_week: MON-SUN
then:
- light.turn_off: sign_light
# Cron syntax, trigger every 5 minutes
- cron: '0 /60 * * * *'
then:
- if:
condition:
- sun.is_above_horizon:
then:
- light.turn_on:
id: sign_light
effect: Fireworks
- delay: 10s
- script.execute: Daytime
-on_time turned off but the system turned on (ran the script) again a bit later
Many Thanks
D