-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplates.yaml
139 lines (123 loc) · 6.1 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
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
130
131
132
133
134
135
136
137
138
139
####### MagicFrame #######
# Forcast & Events / Prévisions météo et événements
- trigger:
- trigger: time_pattern
minutes: /1
- trigger: homeassistant
event: start
action:
# Forcast / Prévisions météo
- action: weather.get_forecasts
data:
type: daily
target:
entity_id: weather.forecast_YourCity # Entity ID of your weather forecast app. / ID d'entité de votre application de prévisions météo
response_variable: daily
# Events / Événements
- action: calendar.get_events
data:
duration:
hours: 2160 # 90 jours
minutes: 0
seconds: 0
target:
entity_id: calendar.YourCalendarName # Your calendar entity ID / Votre identifiant d'entité de calendrier
response_variable: monthly
sensor:
# Forcast / Prévisions météo
- name: Weather Forecast Daily
unique_id: weather_forecast_daily
state: "{{ now().isoformat() }}"
attributes:
forecast: "{{ daily['weather.forecast_YourCity'].forecast }}" # Entity ID of your weather forecast app. / ID d'entité de votre application de prévisions météo
# Events / Événements
- name: Monthly Events
unique_id: monthly_events
state: "{{ now().isoformat() }}"
attributes:
events: "{{ monthly['calendar.YourCalendarName'].events }}" # Your calendar entity ID / Votre identifiant d'entité de calendrier
# Weather day 1 / Météo jour 1
- name: "weather day 1"
state: "{{ as_timestamp(state_attr('sensor.weather_forecast_daily', 'forecast')[0].datetime) | timestamp_custom('%a') }}"
- name: "weather condition 1"
state: "{{ state_attr('sensor.weather_forecast_daily', 'forecast')[0].condition }}"
- name: "weather temperature 1"
state: "{{ state_attr('sensor.weather_forecast_daily', 'forecast')[0].temperature }}"
unit_of_measurement: °C
- name: "weather templow 1"
state: "{{ state_attr('sensor.weather_forecast_daily', 'forecast')[0].templow }}"
unit_of_measurement: °C
# Weather day 2 / Météo jour 2
- name: "weather day 2"
state: "{{ as_timestamp(state_attr('sensor.weather_forecast_daily', 'forecast')[1].datetime) | timestamp_custom('%a') }}"
- name: "weather condition 2"
state: "{{ state_attr('sensor.weather_forecast_daily', 'forecast')[1].condition }}"
- name: "weather temperature 2"
state: "{{ state_attr('sensor.weather_forecast_daily', 'forecast')[1].temperature }}"
unit_of_measurement: °C
- name: "weather templow 2"
state: "{{ state_attr('sensor.weather_forecast_daily', 'forecast')[1].templow }}"
unit_of_measurement: °C
# Weather day 3 / Météo jour 3
- name: "weather day 3"
state: "{{ as_timestamp(state_attr('sensor.weather_forecast_daily', 'forecast')[2].datetime) | timestamp_custom('%a') }}"
- name: "weather condition 3"
state: "{{ state_attr('sensor.weather_forecast_daily', 'forecast')[2].condition }}"
- name: "weather temperature 3"
state: "{{ state_attr('sensor.weather_forecast_daily', 'forecast')[2].temperature }}"
unit_of_measurement: °C
- name: "weather templow 3"
state: "{{ state_attr('sensor.weather_forecast_daily', 'forecast')[2].templow }}"
unit_of_measurement: °C
# Weather day 4 / Météo jour 4
- name: "weather day 4"
state: "{{ as_timestamp(state_attr('sensor.weather_forecast_daily', 'forecast')[3].datetime) | timestamp_custom('%a') }}"
- name: "weather condition 4"
state: "{{ state_attr('sensor.weather_forecast_daily', 'forecast')[3].condition }}"
- name: "weather temperature 4"
state: "{{ state_attr('sensor.weather_forecast_daily', 'forecast')[3].temperature }}"
unit_of_measurement: °C
- name: "weather templow 4"
state: "{{ state_attr('sensor.weather_forecast_daily', 'forecast')[3].templow }}"
unit_of_measurement: °C
# Weather day 5 / Météo jour 5
- name: "weather day 5"
state: "{{ as_timestamp(state_attr('sensor.weather_forecast_daily', 'forecast')[4].datetime) | timestamp_custom('%a') }}"
- name: "weather condition 5"
state: "{{ state_attr('sensor.weather_forecast_daily', 'forecast')[4].condition }}"
- name: "weather temperature 5"
state: "{{ state_attr('sensor.weather_forecast_daily', 'forecast')[4].temperature }}"
unit_of_measurement: °C
- name: "weather templow 5"
state: "{{ state_attr('sensor.weather_forecast_daily', 'forecast')[4].templow }}"
unit_of_measurement: °C
# Event 1 / Événement 1
- name: "event start 1"
state: "{{ as_timestamp(state_attr('sensor.monthly_events', 'events')[0].start) | timestamp_custom('%A %d %B') }}"
- name: "event summary 1"
state: "{{ state_attr('sensor.monthly_events', 'events')[0].summary }}"
# Event 2 / Événement 2
- name: "event start 2"
state: "{{ as_timestamp(state_attr('sensor.monthly_events', 'events')[1].start) | timestamp_custom('%A %d %B') }}"
- name: "event summary 2"
state: "{{ state_attr('sensor.monthly_events', 'events')[1].summary }}"
# Event 3 / Événement 3
- name: "event start 3"
state: "{{ as_timestamp(state_attr('sensor.monthly_events', 'events')[2].start) | timestamp_custom('%A %d %B') }}"
- name: "event summary 3"
state: "{{ state_attr('sensor.monthly_events', 'events')[2].summary }}"
# Event 4 / Événement 4
- name: "event start 4"
state: "{{ as_timestamp(state_attr('sensor.monthly_events', 'events')[3].start) | timestamp_custom('%A %d %B') }}"
- name: "event summary 4"
state: "{{ state_attr('sensor.monthly_events', 'events')[3].summary }}"
# Event 5 / Événement 5
- name: "event start 5"
state: "{{ as_timestamp(state_attr('sensor.monthly_events', 'events')[4].start) | timestamp_custom('%A %d %B') }}"
- name: "event summary 5"
state: "{{ state_attr('sensor.monthly_events', 'events')[4].summary }}"
# Date & time / Date et heure
- sensor:
- name: "Date and time"
state: "{{ as_timestamp(states('sensor.date_time_iso')) | timestamp_custom('%A %-d %B at %I:%M %p') }}"
icon: "mdi:calendar-clock"