I have the GE switch set up and integrated. I can toggle the switch on and off manually but I cannot toggle the switch when testing the automation. I used the hassio to build the automation and here is the config that it built:
`- id: ‘1549382205542’
alias: GE Outdoor switch
trigger:
event: sunset
platform: sun
event: sunrise
platform: sun
condition: []
action:
Not sure what’s going on. If I change the service to switch.toggle the switch will change state. Am I missing a piece of the data for the switch.turn_on/off?
How do I use code blocks? I used the </> symbol and pasted my code between the tick marks. That didn’t seem to work.
Should the actions not be stacked in the order of the events?
What are you trying to accomplish? Do you just want to toggle the switch at the given times?
You only need the action once no matter how many triggers you have. Your triggers are treated like an OR so if the time is 19:30 or if the time is 21:00, the listed actions will occur.
If you want the switch to turn on at a specific time and then off at a different time, I would use 2 separate automations, one with switch.turn_on and one with switch.turn_off. That way if someone manually changes the state, it won’t toggle incorrectly when the time occurs.
That all makes sense. I wanted to turn the switch on at 19:30 but the switch.turn_on does not turn on the switch. Switch.toggle does work. I have no clue what is missing.