@popboxgun wrote:
Right now I have 6 zones, each zone has different triggers for enter and leave. So between the 6 zones, there’s 12 different blocks of code.
- platform: zone entity_id: device_tracker.life360_1,device_tracker.life360_2 zone: zone.one event: enter - platform: zone entity_id: device_tracker.life360_1,device_tracker.life360_2 zone: zone.one event: leave - platform: zone entity_id: device_tracker.life360_1,device_tracker.life360_2 zone: zone.two event: enter - platform: zone entity_id: device_tracker.life360_1,device_tracker.life360_2 zone: zone.two event: leave
etc…etc…
I was hoping to something like the templating last option that Pedro lists here, but you can’t have generic zone trigger without event and zone.
It also doesn’t appear you can put multiple zones or events in the trigger either.
- platform: zone entity_id: device_tracker.life360_1,device_tracker.life360_2 zone: zone.one, zone.two event: leave, enter
Is there any way to cutdown on this code?
Posts: 3
Participants: 2