1
0
mirror of https://github.com/Adam-Ant/home-assistant synced 2024-11-14 15:36:22 +00:00
home-assistant/sensors/pill_button.yaml
2016-11-29 18:40:14 +00:00

15 lines
527 B
YAML

# Seconds since Pill Button Sensor changed
- platform: template
sensors:
last_pill:
unit_of_measurement: Sec
friendly_name: Pill Last Taken
value_template: '{% if states.sensor.pill_button_sensor.last_updated is undefined %}{{"00:00:00"}}{% else %}{{ ((as_timestamp(states.sensor.time.last_updated)-as_timestamp(states.sensor.pill_button_sensor.last_updated))|int) }}{% endif %}'
# Push Button Sensor
- platform: mqtt
name: Pill Button Sensor
state_topic: 'dash/pill_reminder'
hide: false