This is a complete edit from my original post because I couldn’t find a way to delete it. It started as an issue with an automation error, but in looking at my automation, even if I got things to work, it wouldn’t be correct.
What I want to do is this:
-
If it is any time between 45 minutes before sunset and anytime before sunrise and
-
I turn on any activity in my Harmony Hub (harmony-api installed and working, using mqtt triggers)
-
Run two scenes, one first then another a minute later
I first tried getting the scenes to run whenever I ran an activity on the harmony hub and that worked fine. So then I added in my condition for the sun,
# MQTT/Harmony
- alias: 'Theater Lights'
trigger:
platform: mqtt
topic: harmony-api/state
payload: 'on'
condition:
condition: sun
event: sunset
offset: "-00:45:00"
action:
- service: scene.turn_on
entity_id: scene.sunset1
- delay: 00:01:00
- service: scene.turn_on
entity_id: scene.sunset2
And that kept generating an extra keys error
voluptuous.MultipleInvalid: extra keys not allowed @ data['offset']
But while trying to figure out the source of the error, I realized that this wasn’t correct anyway as this would only work if it was exactly 45 minutes before sunset and no other time.
Can anyone tell me how I should be setting the conditions for what I want to do? I can’t seem to figure it out on my own and I’m feeling kind of dumb!