Periodic Config Updates
This commit is contained in:
@@ -42,3 +42,98 @@ general_notificatioon:
|
||||
alias: General Notification
|
||||
description: ''
|
||||
icon: mdi:bell-badge
|
||||
get_cal_data:
|
||||
sequence:
|
||||
- action: calendar.get_events
|
||||
metadata: {}
|
||||
data:
|
||||
duration:
|
||||
hours: 96
|
||||
minutes: 0
|
||||
seconds: 0
|
||||
response_variable: Events
|
||||
target:
|
||||
entity_id: calendar.szumkoal_gmail_com
|
||||
alias: Get Cal Data
|
||||
description: ''
|
||||
parse_morning_weather:
|
||||
sequence:
|
||||
- variables:
|
||||
high: '{{ state_attr(''sensor.daily_forecast'', ''temperature_2m_max'')[0] }}'
|
||||
low: '{{ state_attr(''sensor.daily_forecast'', ''temperature_2m_min'')[0] }}'
|
||||
temp_unit: '{{ state_attr(''sensor.units'', ''temperature_2m'') }}'
|
||||
condition: "{% set code = state_attr('sensor.daily_forecast', 'weather_code')[0]
|
||||
| int %} {% set mapper = {\n 0: \"Clear sky\",\n 1: \"Mainly clear\",\n
|
||||
\ 2: \"Partly cloudy\",\n 3: \"Overcast\",\n 45: \"Fog\",\n 48: \"Depositing
|
||||
rime fog\",\n 51: \"Drizzle - Light intensity\",\n 53: \"Drizzle - Moderate
|
||||
intensity\",\n 55: \"Drizzle - Dense intensity\",\n 56: \"Freezing Drizzle
|
||||
- Light intensity\",\n 57: \"Freezing Drizzle - Dense intensity\",\n 61:
|
||||
\"Rain - Slight intensity\",\n 63: \"Rain - Moderate intensity\",\n 65:
|
||||
\"Rain - Heavy intensity\",\n 66: \"Freezing Rain - Light intensity\",\n
|
||||
\ 67: \"Freezing Rain - Heavy intensity\",\n 71: \"Snow fall - Slight intensity\",\n
|
||||
\ 73: \"Snow fall - Moderate intensity\",\n 75: \"Snow fall - Heavy intensity\",\n
|
||||
\ 77: \"Snow grains\",\n 80: \"Rain showers - Slight intensity\",\n 81:
|
||||
\"Rain showers - Moderate intensity\",\n 82: \"Rain showers - Violent intensity\",\n
|
||||
\ 85: \"Snow showers - Slight intensity\",\n 86: \"Snow showers - Heavy intensity\",\n
|
||||
\ 95: \"Thunderstorm - Slight intensity\",\n 96: \"Thunderstorm with slight
|
||||
hail\",\n 99: \"Thunderstorm with heavy hail\"\n } %}\n {{ mapper.get(code,
|
||||
\"Not Availible\") }}\n"
|
||||
current_temp: '{{ state_attr(''sensor.current_weather'', ''apparent_temperature'')
|
||||
}}'
|
||||
alias: Parse_Morning_Weather
|
||||
description: ''
|
||||
parse_current_weather:
|
||||
sequence:
|
||||
- variables:
|
||||
time: '{{ state_attr(''sensor.current_weather'', ''time'') | as_timestamp()
|
||||
| timestamp_custom(''%B %d, %Y, %I:%M %p'') }}'
|
||||
temp: '{{ state_attr(''sensor.current_weather'', ''temperature_2m'') }}'
|
||||
apparent_temp: '{{ state_attr(''sensor.current_weather'', ''apparent_temperature'')
|
||||
}}'
|
||||
precip: '{{ state_attr(''sensor.current_weather'', ''precipitation'') }}'
|
||||
weather_code: "{% set code = state_attr('sensor.current_weather', 'weather_code')
|
||||
| int %} {% set mapper = {\n 0: \"Clear sky\",\n 1: \"Mainly clear\",\n
|
||||
\ 2: \"Partly cloudy\",\n 3: \"Overcast\",\n 45: \"Fog\",\n 48: \"Depositing
|
||||
rime fog\",\n 51: \"Drizzle - Light intensity\",\n 53: \"Drizzle - Moderate
|
||||
intensity\",\n 55: \"Drizzle - Dense intensity\",\n 56: \"Freezing Drizzle
|
||||
- Light intensity\",\n 57: \"Freezing Drizzle - Dense intensity\",\n 61:
|
||||
\"Rain - Slight intensity\",\n 63: \"Rain - Moderate intensity\",\n 65:
|
||||
\"Rain - Heavy intensity\",\n 66: \"Freezing Rain - Light intensity\",\n
|
||||
\ 67: \"Freezing Rain - Heavy intensity\",\n 71: \"Snow fall - Slight intensity\",\n
|
||||
\ 73: \"Snow fall - Moderate intensity\",\n 75: \"Snow fall - Heavy intensity\",\n
|
||||
\ 77: \"Snow grains\",\n 80: \"Rain showers - Slight intensity\",\n 81:
|
||||
\"Rain showers - Moderate intensity\",\n 82: \"Rain showers - Violent intensity\",\n
|
||||
\ 85: \"Snow showers - Slight intensity\",\n 86: \"Snow showers - Heavy intensity\",\n
|
||||
\ 95: \"Thunderstorm - Slight intensity\",\n 96: \"Thunderstorm with slight
|
||||
hail\",\n 99: \"Thunderstorm with heavy hail\"\n } %}\n {{ mapper.get(code,
|
||||
\"Not Availible\") }}\n"
|
||||
daytime: '{{ state_attr(''sensor.current_weather'', ''is_day'') }}'
|
||||
alias: Parse Current Weather
|
||||
description: ''
|
||||
parse_hourly_weather:
|
||||
sequence:
|
||||
- variables:
|
||||
iso_time: '{{ state_attr(''sensor.hourly_forecast'', ''time'') }}'
|
||||
temp: '{{ state_attr(''sensor.hourly_forecast'', ''temperature_2m'') }}'
|
||||
precip_prob: '{{ state_attr(''sensor.hourly_forecast'', ''precipitation_probability'')
|
||||
}}'
|
||||
weather_code: '{{ state_attr(''sensor.hourly_forecast'', ''weather_code'') }}'
|
||||
precip: '{{ state_attr(''sensor.hourly_forecast'', ''precipitation'') }}'
|
||||
count: 0
|
||||
formatted_time: []
|
||||
- variables:
|
||||
test: '{% set count = count +1 %}'
|
||||
formatted_time: "\n{% set result = [] %} \n{% for i in range(iso_time | length)
|
||||
%}\n {% set formatted = iso_time[i] | as_timestamp() | timestamp_custom('%B
|
||||
%d, %Y, %I:%M %p') %}\n {% set result = result + [iso_time[i] | as_timestamp()
|
||||
| timestamp_custom('%B %d, %Y, %I:%M %p')] %}\n{% endfor %} \n{{ result }}\n
|
||||
\ \n"
|
||||
- action: notify.persistent_notification
|
||||
metadata: {}
|
||||
data:
|
||||
title: test
|
||||
message: '{{iso_time}}
|
||||
|
||||
{{ formatted_time }}'
|
||||
alias: Parse Hourly Weather
|
||||
description: ''
|
||||
|
||||
Reference in New Issue
Block a user