mysmarthome/packages/life360.yaml
Mahasri Kalavala 7469d1bf0c minor updates
2019-07-07 16:47:16 -04:00

52 lines
2.0 KiB
YAML

###############################################################################
# PACKAGE: LIFE365 SENSOR
# Description: The Life365 sensor requires username, password and mqtt topic.
# Whatever the topic you specify, the data will be dumped there.
# Use the exact topic name in the Parse Life365 Data automation.
#
# What is Life365?
# It is Life360 sensor, much simpler and a lot better ;)
# this component used to be life360, until it has a conflict with official
# component..., so I simply changed to Life365!
###############################################################################
homeassistant:
customize:
sensor.life365_sensor:
friendly_name: Life 365
hidden: true
sensor:
- platform: life365
username: !secret life360_username
password: !secret life360_password
mqtt_topic: "/life360/data"
scan_interval: 15
###############################################################################
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
# / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \
# /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
#
###############################################################################
automation:
###############################################################################
# Alert me When the sensor fails
###############################################################################
- alias: Alert Life365 Error
initial_state: true
trigger:
platform: state
entity_id: sensor.life365_sensor
to: 'error'
for: '00:05:00'
action:
- service: script.notify_me
data_template:
message: "Life365 Sensor state changed to: {{ trigger.to_state.state| upper }}."