- action: - data: group_name: Living room scene_name: Bright service: hue.hue_activate_scene alias: Correl's Home condition: - after: sunset before: sunrise condition: sun id: '1521648884156' trigger: - entity_id: device_tracker.homeassistant_pixel event: enter platform: zone zone: zone.home - action: - data: group_name: Living room scene_name: Stephanie service: hue.hue_activate_scene alias: Stephanie's Home condition: [] id: '1521649963712' trigger: - entity_id: device_tracker.stephaniesiphone from: not_home platform: state to: home - action: - delay: '00:00:05' - service: script.sonos_tts data_template: message: >- Welcome home, {{ states | selectattr("entity_id", "in", states.group.phones.attributes.entity_id) | selectattr('state', 'eq', 'home') | map(attribute='attributes.friendly_name') | join(' and ')}}! alias: Welcome home trigger: - entity_id: group.phones platform: state from: not_home to: home - action: - service: notify.notifymyandroid data: message: >- Someone's home: {{ states | selectattr("entity_id", "in", states.group.phones.attributes.entity_id) | selectattr('state', 'eq', 'home') | map(attribute='attributes.friendly_name') | join(' and ')}}. alias: Notify that someone else is home trigger: - entity_id: group.phones platform: state to: home condition: - condition: state entity_id: device_tracker.homeassistant_pixel state: not_home