-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsensors.yaml
116 lines (109 loc) · 3.91 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
###############################################
## Distance Between Persons Sensor in Meters
###############################################
- platform: template
sensors:
distance_between_kris_and_sen:
friendly_name: Distance Between Kris and Sen
value_template: "{{ (distance(states.person.sen, states.person.kris) * 1000) | round(0, default=none) }}"
unit_of_measurement: "m"
icon_template: "mdi:map-marker-distance"
###############################################
## Other Sensors
###############################################
- platform: time_date
display_options:
- "time"
- "date"
###############################################
## Last Changed Sensors
###############################################
- platform: template
sensors:
front_door_last_triggered:
friendly_name: "Front Door Last Triggered"
value_template: >
{{ as_timestamp(states.binary_sensor.hall_door_contact.last_changed, 0) | timestamp_custom('%d.%m.%Y %H:%M:%S',1) }}
bedroom_window_last_triggered:
friendly_name: "Bedroom Window Last Triggered"
value_template: >
{{ as_timestamp(states.binary_sensor.bedroom_window_contact.last_changed, 0) | timestamp_custom('%d.%m.%Y %H:%M:%S',1) }}
bedroom_door_last_triggered:
friendly_name: "Bedroom Door Last Triggered"
value_template: >
{{ as_timestamp(states.binary_sensor.bedroom_door_contact.last_changed, 0) | timestamp_custom('%d.%m.%Y %H:%M:%S',1) }}
###############################################
## Energy Sensors
###############################################
- platform: template
sensors:
grid_consumed_today_cost:
friendly_name: "Grid Consumed Today Cost"
value_template: >
{{ ((states('sensor.grid_consumed_today') | float(0.0)) * 8.5) | round(2, default=0) }}
unit_of_measurement: "Kč"
device_class: monetary
###############################################
## ADS-B System / Flightradar 24
###############################################
- platform: rest
name: FR24 Feeder
resource: http://127.0.0.1:8754/monitor.json
value_template: "{{ value_json.feed_alias }}"
method: GET
scan_interval: 60
json_attributes:
- rx_connected
- feed_status
- d11_map_size
- feed_num_ac_tracked
- build_version
- feed_alias
- platform: template
sensors:
fr24_feeder_radar_code:
friendly_name: Radar Code
value_template: "{{ state_attr('sensor.fr24_feeder', 'feed_alias') }}"
fr24_feeder_aircraft_tracked:
friendly_name: Aircraft Tracked
value_template: "{{ state_attr('sensor.fr24_feeder', 'd11_map_size') | round(0, default=none) }}"
unit_of_measurement: "aircrafts"
fr24_feeder_aircraft_uploaded:
friendly_name: Aircraft Uploaded
value_template: "{{ state_attr('sensor.fr24_feeder', 'feed_num_ac_tracked') | round(0, default=none) }}"
unit_of_measurement: "aircrafts"
fr24_feeder_version:
friendly_name: Version
value_template: "{{ state_attr('sensor.fr24_feeder', 'build_version') }}"
- platform: rest
name: FR24 Aircraft
resource: http://127.0.0.1:8080/data/aircraft.json
value_template: "{{ value_json.messages }}"
method: GET
scan_interval: 15
json_attributes:
- now
- aircraft
- platform: template
sensors:
mikrotik_wireless_clients:
friendly_name: "Mikrotik Clients"
value_template: "{{ states('sensor.mikrotik_hap_ax_3_wireless_clients') | int(0) }}"
unit_of_measurement: "clients"
###############################################
## History Stats
###############################################
- platform: history_stats
name: "Asus PC Work Time Today"
entity_id: switch.asus_pc
state: "on"
type: time
start: "{{ today_at('00:00:00') }}"
end: "{{ now() }}"
- platform: history_stats
name: "Lenovo Laptop Work Time Today"
entity_id: switch.lenovo_thinkbook
state: "on"
type: time
start: "{{ today_at('00:00:00') }}"
end: "{{ now() }}"