-
Notifications
You must be signed in to change notification settings - Fork 44
/
Templates.yaml
39 lines (34 loc) · 1.06 KB
/
Templates.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
sensor:
- platform: template
sensors:
### TV Status ###
tv_status:
friendly_name: "TV Status"
value_template: >-
{% if states('sensor.tv_power')|float < 2 %}
off
{% elif states('sensor.tv_power')|float < 10 %}
standby
{% else %}
on
{% endif %}
### TIME ###
end_time:
friendly_name: 'End Time'
value_template: "{{ (now().strftime('%s') | int + (float(states('input_number.hour_select'))*60*60)) | timestamp_custom('%H:%M') }}"
### CONVERT TEMPERATURE OF ROOMS ###
bedroom_temperature:
friendly_name: 'Bedroom Temperature'
value_template: "{{ state_attr('climate.bedroom', 'current_temperature') }}"
lock:
- platform: value_template
name: Garage Door
value_template: "{{ is_state('sensor.garagedoorsensor.state', 'on') }}"
lock:
service: switch.turn_on
data:
entity_id: switch.garagedoor_close
unlock:
service: switch.turn_on
data:
entity_id: switch.garagedoor_open