Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Kombinerar nmap och ios för att öka säkerheten att den registrerar att man är hemma.
- - alias: 'Andreas is home'
- trigger:
- - platform: state
- entity_id: device_tracker.andreasiphone
- to: 'home'
- - platform: state
- entity_id: device_tracker.andreaswulffiphone
- to: 'home'
- condition:
- condition: state
- entity_id: input_boolean.andreas_hemma
- state: 'off'
- action:
- service: homeassistant.turn_on
- entity_id: input_boolean.andreas_hemma
- # Sätter input boolean för min hemmavaro till off om appen registrerar att jag är borta i mer än 10 minuter
- - alias: 'Andreas is away'
- trigger:
- - platform: state
- entity_id: device_tracker.andreaswulffiphone
- to: 'not_home'
- # for:
- # minutes: 5
- - platform: state
- entity_id: device_tracker.andreaswulffiphone
- to: ''
- condition:
- condition: state
- entity_id: device_tracker.andreasiphone
- state: 'not_home'
- action:
- service: homeassistant.turn_off
- entity_id: input_boolean.andreas_hemma
- # Sätter input boolean för min hemmavaro till off om appen registrerar att jag är borta i mer än 10 minuter
- - alias: 'Andreas is away nmap'
- trigger:
- platform: state
- entity_id: device_tracker.andreasiphone
- to: 'not_home'
- condition:
- condition: or
- conditions:
- - condition: state
- entity_id: device_tracker.andreaswulffiphone
- state: 'not_home'
- - condition: state
- entity_id: device_tracker.andreaswulffiphone
- state: 'jobb'
- action:
- service: homeassistant.turn_off
- entity_id: input_boolean.andreas_hemma
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement