#Code
1 messages · Page 1 of 1 (latest)
alias: Porch Lights
description: ""
trigger:
- platform: sun
event: sunrise
offset: 0
- platform: sun
event: sunset
offset: 0
condition: []
action:
- choose:
- conditions: "{{ trigger.event == 'sunrise' }}"
sequence:
- service: light.turn_off
target:
entity_id:
- light.front_porch
- light.back_porch
data: {}
- conditions: "{{ trigger.event == 'sunset' }}"
sequence:
- service: light.turn_on
data:
brightness_pct: 100
target:
entity_id:
- light.front_porch
- light.back_porch
mode: single
alias: Porch Light Controls - Sun Triggers
description: ""
trigger:
- platform: sun
event: sunset
offset: 0
id: sunset
- platform: sun
event: sunrise
offset: 0
id: sunrise
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: sunset
sequence:
- service: light.turn_on
data: {}
target:
entity_id:
- light.back_porch_status
- light.front_porch_status
- conditions:
- condition: trigger
id: sunrise
sequence:
- service: light.turn_off
data: {}
target:
entity_id:
- light.back_porch_status
- light.front_porch_status
mode: single
This is my automation for the same thing, and haven't had an issue yet..
my issue was that another integration was calling light.turn_on at the exact same time
i've since refactored everything and that automation now lives on the devices themselves through esphome
here's that code
Yeah, I wouldn't use ESPHome (or WiFi) lights.. wouldn't want all that crap cluttering my WiFi network.
my wireless access point is rated for a hell of a lot more clients than i have including lights and other wifi iot devices
plus i'm planning on adding another access point to the other side of the house rated for just as many
and with esphome, the network traffic is minimal
Yeah I get that. I have all Unifi hardware here, with Enterprise Access Points.. broken down into multiple segregated vlans.. but still wouldn't put any unnecessary crap on it
i mean i wouldn't describe lighting and other smart home utility as unnecessary
that's not to say it's necessary either but it's useful
except I didn't describe them as such 😉
and my network performance, also on unifi, hasn't suffered any with 25-30ish shelly wifi products
Running them via WiFi is unnecessary when there is are much better alternative.
there are better alternatives sure, but why would i need something better when what i have now works perfectly
No one is suggesting an alternative to you
i'm just stating my case, same as you lol
"I wouldn't use ESPHome (or WiFi) lights." believe that statement says I wouldn't
not "you shouldn't"
I was just correcting your Automation coding
oh the automation i posted works fine now that there isn't another one messing with it
the Choose action acts like a if/then ... it the first one is true it doesn't execute the 2nd
So to avoid this using a Trigger ID
based on the Triggers given in the automation
to trigger the Choose Option
yeah i know