Hello, im trying to trigger this automation depending on which zone im currently in. As a state trigger i use my person.entity which has a device tracker on it that works, it changes state accordingly to the zone im in.
I dont want to have a “from” and “to” option as that would limit the automation
Someone on discord suggested to put down null, as then it would trigger on state changes only.
But unfortunately it does not trigger. Here is my code, does anyone have a working trigger ?
Thank you
alias: Arrived Kevin
description: ''
trigger:
- platform: state
entity_id:
- person.kevin
for:
hours: 0
minutes: 0
seconds: 1
from: 'null'
condition: []
action:
- choose:
- conditions:
- condition: zone
entity_id: person.kevin
zone: zone.dollartree
sequence:
- service: tts.google_translate_say
data:
entity_id: media_player.living_room_display
message: Kevin arrived at Dollartree.
- service: light.turn_on
data:
brightness_pct: 100
effect: Sine
rgb_color:
- 255
- 180
- 0
target:
entity_id: light.wled_infinty_cube
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- service: script.stop_streaming
data: {}
- service: light.turn_off
data: {}
target:
entity_id: light.wled_infinty_cube
- conditions:
- condition: zone
entity_id: person.kevin
zone: zone.kftea
sequence:
- service: tts.google_translate_say
data:
entity_id: media_player.living_room_display
message: Kevin arrived at KFtea.
- service: light.turn_on
data:
brightness_pct: 100
effect: Sine
rgb_color:
- 255
- 180
- 0
target:
entity_id: light.wled_infinty_cube
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- service: script.stop_streaming
data: {}
- service: light.turn_off
data: {}
target:
entity_id: light.wled_infinty_cube
- conditions:
- condition: zone
entity_id: person.kevin
zone: zone.wallmart
sequence:
- service: tts.google_translate_say
data:
entity_id: media_player.living_room_display
message: Kevin arrived at Wallmart.
- service: light.turn_on
data:
rgb_color:
- 255
- 180
- 0
brightness_pct: 100
effect: Sine
target:
entity_id: light.wled_infinty_cube
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- service: script.stop_streaming
data: {}
- service: light.turn_off
data: {}
target:
entity_id: light.wled_infinty_cube
- conditions:
- condition: zone
entity_id: person.kevin
zone: zone.brigitte
sequence:
- service: tts.google_translate_say
data:
entity_id: media_player.living_room_display
message: Kevin arrived at Home.
- service: light.turn_on
data:
rgb_color:
- 255
- 180
- 0
brightness_pct: 100
effect: Sine
target:
entity_id: light.wled_infinty_cube
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- service: script.stop_streaming
data: {}
- service: light.turn_off
data: {}
target:
entity_id: light.wled_infinty_cube
- conditions:
- condition: zone
entity_id: person.kevin
zone: zone.costco
sequence:
- service: tts.google_translate_say
data:
entity_id: media_player.living_room_display
message: Kevin arrived at Costco.
- service: light.turn_on
data:
rgb_color:
- 255
- 180
- 0
brightness_pct: 100
effect: Sine
target:
entity_id: light.wled_infinty_cube
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- service: script.stop_streaming
data: {}
- service: light.turn_off
data: {}
target:
entity_id: light.wled_infinty_cube
- conditions:
- condition: zone
entity_id: person.kevin
zone: zone.kfc
sequence:
- service: tts.google_translate_say
data:
entity_id: media_player.living_room_display
message: Kevin arrived at KFC.
- service: light.turn_on
data:
rgb_color:
- 255
- 180
- 0
brightness_pct: 100
effect: Sine
target:
entity_id: light.wled_infinty_cube
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- service: script.stop_streaming
data: {}
- service: light.turn_off
data: {}
target:
entity_id: light.wled_infinty_cube
- conditions:
- condition: zone
entity_id: person.kevin
zone: zone.amazon
sequence:
- service: tts.google_translate_say
data:
entity_id: media_player.living_room_display
message: Kevin arrived at Amazon.
- service: light.turn_on
data:
rgb_color:
- 255
- 180
- 0
brightness_pct: 100
effect: Sine
target:
entity_id: light.wled_infinty_cube
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- service: script.stop_streaming
data: {}
- service: light.turn_off
data: {}
target:
entity_id: light.wled_infinty_cube
- conditions:
- condition: zone
entity_id: person.kevin
zone: zone.brigitte_s_parents
sequence:
- service: tts.google_translate_say
data:
entity_id: media_player.living_room_display
message: Kevin arrived at memee.
- service: light.turn_on
data:
rgb_color:
- 255
- 180
- 0
brightness_pct: 100
effect: Sine
target:
entity_id: light.wled_infinty_cube
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- service: script.stop_streaming
data: {}
- service: light.turn_off
data: {}
target:
entity_id: light.wled_infinty_cube
default: []
mode: single