The entity already has the switch name in front of it:
- id: '9205477723305'
alias: TEST
trigger:
platform: time
at: '21:16:00'
action:
service: light.turn_on
data:
entity_id: switch.leviton_dzs151lz_switch_switch
But I noticed in your example you used switch.turn_on instead of light. let me try that.
I think that was it! Thank you!. That darn light.turn_on doesn’t really work after all
Hang on I have more to post but let me double check something first
Would I have had to enter it exactly like below for it to work. Cause straight editor doesn’t need it and that way is easier for me.
{
“entity_id”: “switch.leviton_dzs151lz_switch_switch”
}
I just backed up all my work so I can work on the sunset tomorrow. I would have NEVER got this to work without all of your HELP. The ONLY part I had a hunch on was the light.turn_on being bad. And when I saw Dave’s example that gave me the push to find out!
Thanks for all your help!
Yes you would have entered it in the GUI exactly like that… you probably missed it in the post where I showed you my switch example I said you could add that in there.
Honestly, it’s a bastard getting this working and understanding the logic sometimes but I bet you learned a lot battling through it!
Yes it is.
I rushed into this too fast initially-I thought it was pnp and got frustrated, then started taking baby steps and have been having better luck.
Started it all on Thurs, then first thing working was a wifi switch on Friday.
Then ordered Zwave usb Friday night and had it Sunday morning (Amazon surprised me and it came early).
Got the zwave usb controller working on Sunday and then got my first Zwave switch working last night.
Now tonight got first small automation working (thanks again for all the help). Just now setup a sunset timer based on what we got working tonight. Hopeful it will work and then I will start adding more zwave once it is working good!
.
@Taras, - thank you for your idea. I need to test an automation that depends on sunset and I want to test the condition as it is. So I do what you have suggested - (a) stop NTP, (b) set OS time just before sunset in my location. While Developer tools → Templates with {{ now() }} shows that the time indeed was updated, not all components of HA seem to be aware of the change. If I do restart HA - they become aware. My question is - is there a more light way to make all components aware of the time change, because it full restart takes a lot of time… Something like emitting clock_updated event, or similar?..
My suggestion was made 2 years ago. Home Assistant today is nothing like it was 2 years ago. It’s inadvisable to assume advice posted 2 years ago is still applicable today.