Initial work on a presence tracker. Inspired by @helto4real

This commit is contained in:
2019-08-05 13:39:03 +02:00
parent 3e61dcda71
commit 7305d719ee
4 changed files with 206 additions and 4 deletions

37
packages/presence.yaml Normal file
View File

@@ -0,0 +1,37 @@
homeassistant:
customize:
package.node_anchors:
common: &common
package: 'security'
binary_sensor.home_occupied:
<<: *common
automation.adm_rescan_monitor_on_restart:
<<: *common
binary_sensor:
- platform: template
sensors:
home_occupied:
friendly_name: Anyone home
value_template: >-
{{ (is_state('device_tracker.thomas_presence', 'home') or
is_state('device_tracker.anneli_presence', 'home')) }}
device_tracker:
- platform: unifi
host: unifi
username: !secret unifi_username
password: !secret unifi_password
verify_ssl: false
ssid_filter: !secret unifi_ssids
automation:
- alias: ADM - Rescan monitor on restart
trigger:
platform: homeassistant
event: start
action:
- service: mqtt.publish
data:
topic: "monitor/scan/restart"