Skip to content

Commit

Permalink
alarm_time now set by hassalarm
Browse files Browse the repository at this point in the history
  • Loading branch information
eifinger committed Dec 23, 2018
1 parent f0b89de commit 2d8b32e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sensor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -694,10 +694,12 @@
sensors:
alarm_time:
friendly_name: 'Uhrzeit'
value_template: '{{ "%0.02d:%0.02d" | format(states("input_number.alarmhour") | int, states("input_number.alarmminutes") | int) }}'
value_template: '{%if states.device_tracker.sina.state == "home" and states.device_tracker.kevin.state == "home" %}{% if as_timestamp(states.sensor.alarm_kevin.state) > as_timestamp(states.sensor.alarm_sina.state) %}{{states.sensor.alarm_kevin.state}}{% else %}{{states.sensor.alarm_sina.state}}{% endif %}{% elif states.device_tracker.sina.state == "home" %}{{states.sensor.alarm_sina.state}}{% elif states.device_tracker.kevin.state == "home" %}{{states.sensor.alarm_kevin.state}}{% endif %}'
entity_id:
- input_number.alarmhour
- input_number.alarmminutes
- device_tracker.sina
- device_tracker.kevin
- sensor.alarm_kevin
- sensor.alarm_sina
#################################################################
## Broadlink
#################################################################
Expand Down

0 comments on commit 2d8b32e

Please sign in to comment.