Advertisement
Guest User

Nmap

a guest
Jan 19th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.73 KB | None | 0 0
  1. # Kombinerar nmap och ios för att öka säkerheten att den registrerar att man är hemma.
  2.   - alias: 'Andreas is home'
  3.     trigger:
  4.       - platform: state
  5.         entity_id: device_tracker.andreasiphone
  6.         to: 'home'
  7.       - platform: state
  8.         entity_id: device_tracker.andreaswulffiphone
  9.         to: 'home'
  10.     condition:
  11.       condition: state
  12.       entity_id: input_boolean.andreas_hemma
  13.       state: 'off'
  14.     action:
  15.       service: homeassistant.turn_on
  16.       entity_id: input_boolean.andreas_hemma
  17.      
  18. # Sätter input boolean för min hemmavaro till off om appen registrerar att jag är borta i mer än 10 minuter
  19.   - alias: 'Andreas is away'
  20.     trigger:
  21.       - platform: state
  22.         entity_id: device_tracker.andreaswulffiphone
  23.         to: 'not_home'
  24. #        for:
  25. #          minutes: 5
  26.       - platform: state
  27.         entity_id: device_tracker.andreaswulffiphone
  28.         to: ''
  29.     condition:
  30.       condition: state
  31.       entity_id: device_tracker.andreasiphone
  32.       state: 'not_home'
  33.     action:
  34.       service: homeassistant.turn_off
  35.       entity_id: input_boolean.andreas_hemma
  36.      
  37. # Sätter input boolean för min hemmavaro till off om appen registrerar att jag är borta i mer än 10 minuter
  38.   - alias: 'Andreas is away nmap'
  39.     trigger:
  40.       platform: state
  41.       entity_id: device_tracker.andreasiphone
  42.       to: 'not_home'
  43.     condition:
  44.       condition: or
  45.       conditions:
  46.       - condition: state
  47.         entity_id: device_tracker.andreaswulffiphone
  48.         state: 'not_home'
  49.       - condition: state
  50.         entity_id: device_tracker.andreaswulffiphone
  51.         state: 'jobb'
  52.     action:
  53.       service: homeassistant.turn_off
  54.       entity_id: input_boolean.andreas_hemma
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement