-
Notifications
You must be signed in to change notification settings - Fork 1
/
sensors.yaml
executable file
·129 lines (124 loc) · 5.54 KB
/
sensors.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#################################################################
## Sensors
#################################################################
#
#
- platform: template
name: UpstairsVacuum
sensors:
upstairs_vacuum_status:
value_template: "{{ states.vacuum.upstairs_vacuum.attributes['status'] }}"
friendly_name: "Upstairs Vacuum Status"
icon_template: mdi:information
upstairs_vacuum_error:
value_template: "{{ states.vacuum.upstairs_vacuum.attributes['error'] }}"
friendly_name: "Upstairs Vacuum Error"
icon_template: mdi:information
upstairs_vacuum_fan:
value_template: "{{ states.vacuum.upstairs_vacuum.attributes['fan_speed'] }}"
friendly_name: "Upstairs Vacuum Fan"
icon_template: mdi:fan
upstairs_vacuum_cleaned_area:
value_template: "{{ states.vacuum.upstairs_vacuum.attributes['cleaned_area'] }}"
friendly_name: "Upstairs Vacuum Cleaned area"
unit_of_measurement: "m2"
icon_template: mdi:broom
upstairs_vacuum_battery:
value_template: "{{ states.vacuum.upstairs_vacuum.attributes['battery_level'] }}"
friendly_name: "Upstairs Vacuum Battery"
unit_of_measurement: "%"
icon_template: mdi:battery
upstairs_vacuum_cleaning_time:
value_template: "{{ states.vacuum.upstairs_vacuum.attributes['cleaning_time'] }}"
friendly_name: "Upstairs Vacuum Cleaning time"
icon_template: mdi:timer
- platform: template
name: DownstairsVacuum
sensors:
downstairs_vacuum_status:
value_template: "{{ states.vacuum.downstairs_vacuum.attributes['status'] }}"
friendly_name: "Downstairs Vacuum Status"
icon_template: mdi:information
downstairs_vacuum_error:
value_template: "{{ states.vacuum.downstairs_vacuum.attributes['error'] }}"
friendly_name: "Downstairs Vacuum Error"
icon_template: mdi:information
downstairs_vacuum_fan:
value_template: "{{ states.vacuum.downstairs_vacuum.attributes['fan_speed'] }}"
friendly_name: "Downstairs Vacuum Fan"
icon_template: mdi:fan
downstairs_vacuum_cleaned_area:
value_template: "{{ states.vacuum.downstairs_vacuum.attributes['cleaned_area'] }}"
friendly_name: "Downstairs Vacuum Cleaned area"
unit_of_measurement: "m2"
icon_template: mdi:broom
downstairs_vacuum_battery:
value_template: "{{ states.vacuum.downstairs_vacuum.attributes['battery_level'] }}"
friendly_name: "Downstairs Vacuum Battery"
unit_of_measurement: "%"
icon_template: mdi:battery
downstairs_vacuum_cleaning_time:
value_template: "{{ states.vacuum.downstairs_vacuum.attributes['cleaning_time'] }}"
friendly_name: "Downstairs Vacuum Cleaning time"
icon_template: mdi:timer
# - platform: moon
- platform: time_date
display_options:
- 'date_time'
# - platform: ring
# monitored_conditions:
# - battery
# - last_activity
# - last_ding
# - last_motion
# - volume
#- platform: template
# sensors:
# vacuum_battery_level:
# value_template: '{{ states.vacuum.upstairs_vacuum.attributes.battery_level }}'
## entity_id: vacuum.upstairs_vacuum
# friendly_name: Vacuum Battery Status
# - platform: template
# sensors:
# last_motion:
# value_template: >-
# {% set today = now().day | int %}
# {% set motion_date = states.sensor.ring_front_door_last_motion.attributes.created_at.strftime("%d") | int %}
# {% if today == motion_date %}
# {% set day = "Today" %}
# {% elif (today - 1) == motion_date %}
# {% set day = "Yesterday" %}
# {% elif today == 1 and motion_date == 30 %}
# {% set day = "Yesterday" %}
# {% elif today == 1 and motion_date == 31 %}
# {% set day = "Yesterday" %}
# {% elif today == 1 and motion_date == 28 %}
# {% set day = "Yesterday" %}
# {% elif today == 1 and motion_date == 29 %}
# {% set day = "Yesterday" %}
# {% else %}
# {% set day = as_timestamp(states.sensor.ring_front_door_last_motion.attributes.created_at) | timestamp_custom("%A")%}
# {% endif %}
# {% set time = as_timestamp(states.sensor.ring_front_door_last_motion.attributes.created_at) | timestamp_custom("%H:%M")%}
# {{[day,time]|join(" at ")}}
# last_ring:
# value_template: >-
# {% set today = now().day | int %}
# {% set ring_date = states.sensor.ring_front_door_last_ding.attributes.created_at.strftime("%d") | int %}
# {% if today == ring_date %}
# {% set day = "Today" %}
# {% elif (today - 1) == ring_date %}
# {% set day = "Yesterday" %}
# {% elif today == 1 and ring_date == 30 %}
# {% set day = "Yesterday" %}
# {% elif today == 1 and ring_date == 31 %}
# {% set day = "Yesterday" %}
# {% elif today == 1 and ring_date == 28 %}
# {% set day = "Yesterday" %}
# {% elif today == 1 and ring_date == 29 %}
# {% set day = "Yesterday" %}
# {% else %}
# {% set day = as_timestamp(states.sensor.ring_front_door_last_ding.attributes.created_at) | timestamp_custom("%A")%}
# {% endif %}
# {% set time = as_timestamp(states.sensor.ring_front_door_last_ding.attributes.created_at) | timestamp_custom("%H:%M")%}
# {{[day,time]|join(" at ")}}