I would like to get my living room lights to turn on on weekdays only. I’ve tried several different suggestions I’ve found and none seem to get me there. I’m sure it’s something silly, but I could use some help from the community.
- alias: LR On Morning
initial_state: 'on'
trigger:
platform: time
at: '05:30:00'
condition: time
weekday:
mon
tue
wed
thu
fri
action:
entity_id: scene.livingroomon
service: scene.turn_on
When I do it as sjee suggests and have Home Assistant check config, this is the error reported.
Invalid config for [automation]: [condition] is an invalid option for [automation]. Check: automation->trigger->0->condition. (See /home/homeassistant/.homeassistant/configuration.yaml, line 166). Please check the docs at https://home-assistant.io/components/automation/
When I do it as mconway suggests, this is the error reported
[homeassistant.util.yaml] mapping values are not allowed here in "/home/homeassistant/.homeassistant/automation.yaml", line 30, column 14
These are the two errors I was getting and I’ve read all the docs, tried indenting every way I could think of.
That got it! The living room lights stayed off this morning. I’ve been trying to get this working off and on for a while now. Looking at what it took, it makes sense but you’re right, it isn’t elegant at all.