🏠
HomeAssistantにGoogle天気(ウェザーニュース)の天気予報データを表示する
はじめに
Home Assistantのダッシュボードを作成した際に自身で工夫したエンティティの設定方法を記事化しました。
この記事ではGoogle天気(日本でのデータソースはウェザーニュース)をWebスクレイピングし、Template Weather Providerに取り込む設定を説明します。
Google天気
https://www.google.com/search?q=weather&hl=ja の情報をWebスクレイピングします。
デフォルトではGoogleがIPアドレスを元に位置情報を判定しますが、URLパラメータ「q」に地域を追加することで手動指定できます。
- 例:神奈川県横浜市
URLエンコードした値を"weather+"の後ろに追加します。
q=weather+%E7%A5%9E%E5%A5%88%E5%B7%9D%E7%9C%8C%E6%A8%AA%E6%B5%9C%E5%B8%82
設定
configuration.yaml
scrape:
# Google天気予報のWebスクレイピング
# https://www.google.com/search?q=weather&hl=ja
- scan_interval: 180
resource: https://www.google.com/search
params:
q: "weather"
hl: "ja"
headers:
User-Agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"
sensor:
- name: gweather_location_name
unique_id: gweather_location_name
select: "span.BBwThe"
- name: gweather_text
unique_id: gweather_text
select: "#wob_dc"
- name: gweather_temperature
unique_id: gweather_temperature
unit_of_measurement: "°C"
select: "#wob_tm"
state_class: measurement
device_class: temperature
- name: gweather_precipitation_probability
unique_id: gweather_precipitation_probability
unit_of_measurement: "%"
select: "#wob_pp"
state_class: measurement
value_template: '{{ value.split("%")[0] }}'
- name: gweather_humidity
unique_id: gweather_humidity
unit_of_measurement: "%"
select: "#wob_hm"
state_class: measurement
device_class: humidity
value_template: '{{ value.split("%")[0] }}'
- name: gweather_wind_speed
unique_id: gweather_wind_speed
unit_of_measurement: "km/h"
select: "#wob_ws"
state_class: measurement
device_class: speed
value_template: '{{ value.split(" ")[0] }}'
- name: gweather_attribution
unique_id: gweather_attribution
select: "div.YfftMc a"
- name: "gweather_text_day_0"
select: "#wob_dp div:nth-of-type(1) img"
attribute: alt
- name: gweather_temp_day_0_high
unique_id: gweather_temp_day_0_high
unit_of_measurement: "°C"
select: "#wob_dp div:nth-of-type(1)>div:nth-last-child(1)>div:nth-of-type(1)>span.wob_t"
state_class: measurement
device_class: temperature
- name: gweather_temp_day_0_low
unique_id: gweather_temp_day_0_low
unit_of_measurement: "°C"
select: "#wob_dp div:nth-of-type(1)>div:nth-last-child(1)>div:nth-of-type(2)>span.wob_t"
state_class: measurement
device_class: temperature
- name: gweather_text_day_1
unique_id: gweather_text_day_1
select: "#wob_dp div:nth-of-type(2) img"
attribute: alt
- name: gweather_temp_day_1_high
unique_id: gweather_temp_day_1_high
unit_of_measurement: "°C"
select: "#wob_dp div:nth-of-type(2)>div:nth-last-child(1)>div:nth-of-type(1)>span.wob_t"
state_class: measurement
device_class: temperature
- name: gweather_temp_day_1_low
unique_id: gweather_temp_day_1_low
unit_of_measurement: "°C"
select: "#wob_dp div:nth-of-type(2)>div:nth-last-child(1)>div:nth-of-type(2)>span.wob_t"
state_class: measurement
device_class: temperature
- name: gweather_text_day_2
unique_id: gweather_text_day_2
select: "#wob_dp div:nth-of-type(3) img"
attribute: alt
- name: gweather_temp_day_2_high
unique_id: gweather_temp_day_2_high
unit_of_measurement: "°C"
select: "#wob_dp div:nth-of-type(3)>div:nth-last-child(1)>div:nth-of-type(1)>span.wob_t"
state_class: measurement
device_class: temperature
- name: gweather_temp_day_2_low
unique_id: gweather_temp_day_2_low
unit_of_measurement: "°C"
select: "#wob_dp div:nth-of-type(3)>div:nth-last-child(1)>div:nth-of-type(2)>span.wob_t"
state_class: measurement
device_class: temperature
- name: gweather_text_day_3
unique_id: gweather_text_day_3
select: "#wob_dp div:nth-of-type(4) img"
attribute: alt
- name: gweather_temp_day_3_high
unique_id: gweather_temp_day_3_high
unit_of_measurement: "°C"
select: "#wob_dp div:nth-of-type(4)>div:nth-last-child(1)>div:nth-of-type(1)>span.wob_t"
state_class: measurement
device_class: temperature
- name: gweather_temp_day_3_low
unique_id: gweather_temp_day_3_low
unit_of_measurement: "°C"
select: "#wob_dp div:nth-of-type(4)>div:nth-last-child(1)>div:nth-of-type(2)>span.wob_t"
state_class: measurement
device_class: temperature
- name: gweather_text_day_4
unique_id: gweather_text_day_4
select: "#wob_dp div:nth-of-type(5) img"
attribute: alt
- name: gweather_temp_day_4_high
unique_id: gweather_temp_day_4_high
unit_of_measurement: "°C"
select: "#wob_dp div:nth-of-type(5)>div:nth-last-child(1)>div:nth-of-type(1)>span.wob_t"
state_class: measurement
device_class: temperature
- name: gweather_temp_day_4_low
unique_id: gweather_temp_day_4_low
unit_of_measurement: "°C"
select: "#wob_dp div:nth-of-type(5)>div:nth-last-child(1)>div:nth-of-type(2)>span.wob_t"
state_class: measurement
device_class: temperature
- name: gweather_text_day_5
unique_id: gweather_text_day_5
select: "#wob_dp div:nth-of-type(6) img"
attribute: alt
- name: gweather_temp_day_5_high
unique_id: gweather_temp_day_5_high
unit_of_measurement: "°C"
select: "#wob_dp div:nth-of-type(6)>div:nth-last-child(1)>div:nth-of-type(1)>span.wob_t"
state_class: measurement
device_class: temperature
- name: gweather_temp_day_5_low
unique_id: gweather_temp_day_5_low
unit_of_measurement: "°C"
select: "#wob_dp div:nth-of-type(6)>div:nth-last-child(1)>div:nth-of-type(2)>span.wob_t"
state_class: measurement
device_class: temperature
- name: gweather_text_day_6
unique_id: gweather_text_day_6
select: "#wob_dp div:nth-of-type(7) img"
attribute: alt
- name: gweather_temp_day_6_high
unique_id: gweather_temp_day_6_high
unit_of_measurement: "°C"
select: "#wob_dp div:nth-of-type(7)>div:nth-last-child(1)>div:nth-of-type(1)>span.wob_t"
state_class: measurement
device_class: temperature
- name: gweather_temp_day_6_low
unique_id: gweather_temp_day_6_low
unit_of_measurement: "°C"
select: "#wob_dp div:nth-of-type(7)>div:nth-last-child(1)>div:nth-of-type(2)>span.wob_t"
state_class: measurement
device_class: temperature
- name: gweather_text_day_7
unique_id: gweather_text_day_7
select: "#wob_dp div:nth-of-type(8) img"
attribute: alt
- name: gweather_temp_day_7_high
unique_id: gweather_temp_day_7_high
unit_of_measurement: "°C"
select: "#wob_dp div:nth-of-type(8)>div:nth-last-child(1)>div:nth-of-type(1)>span.wob_t"
state_class: measurement
device_class: temperature
- name: gweather_temp_day_7_low
unique_id: gweather_temp_day_7_low
unit_of_measurement: "°C"
select: "#wob_dp div:nth-of-type(8)>div:nth-last-child(1)>div:nth-of-type(2)>span.wob_t"
state_class: measurement
device_class: temperature
weather:
# Google天気予報のWebスクレイピング
# https://www.google.com/search?q=weather&hl=ja
- platform: template
name: gweather
unique_id: gweather
humidity_template: "{{ states('sensor.gweather_humidity') | float }}"
temperature_template: "{{ states('sensor.gweather_temperature') | float }}"
temperature_unit: "°C"
wind_speed_template: "{{ states('sensor.gweather_wind_speed') | float }}"
wind_speed_unit: "m/s"
condition_template: "{{ states('sensor.gweather_condition') }}"
attribution_template: "Weather at {{ states('sensor.gweather_location_name') }} provided by {{ states('sensor.gweather_attribution') }}"
forecast_daily_template: >-
[
{% for day_number in range(8) %}
{
"datetime": "{{ (now() + timedelta( days = day_number )).strftime('%Y-%m-%dT00:00:00Z') }}",
"temperature": "{{ states('sensor.gweather_temp_day_' + '{0:d}'.format(day_number) + '_high' ) }}",
"templow": "{{ states('sensor.gweather_temp_day_' + '{0:d}'.format(day_number) + '_low') }}",
"condition": "{{ states('sensor.gweather_condition_day_' + '{0:d}'.format(day_number)) }}"
},
{% endfor %}
]
sensors.yaml
- platform: template
sensors:
# Google天気予報のWebスクレイピング
# https://www.google.com/search?q=weather&hl=ja
gweather_condition:
unique_id: gweather_condition
value_template: >-
{% if is_state('sensor.gweather_text', '晴') %}
sunny
{% elif is_state('sensor.gweather_text', '猛暑') %}
sunny
{% elif is_state('sensor.gweather_text', '晴時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text', '晴朝夕曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text', '晴一時雨') %}
rainy
{% elif is_state('sensor.gweather_text', '晴一時雪') %}
snowy
{% elif is_state('sensor.gweather_text', '晴のち時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text', '晴のち曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text', '晴のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text', '晴のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text', '晴のち雨') %}
rainy
{% elif is_state('sensor.gweather_text', '晴のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text', '晴のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text', '晴のち雪') %}
snowy
{% elif is_state('sensor.gweather_text', '曇') %}
cloudy
{% elif is_state('sensor.gweather_text', '霧') %}
fog
{% elif is_state('sensor.gweather_text', '曇時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text', '曇一時雨') %}
rainy
{% elif is_state('sensor.gweather_text', '曇時々雨') %}
rainy
{% elif is_state('sensor.gweather_text', '曇一時雪') %}
snowy
{% elif is_state('sensor.gweather_text', '曇時々雪') %}
snowy
{% elif is_state('sensor.gweather_text', '曇のち時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text', '曇のち晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text', '曇のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text', '曇のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text', '曇のち雨') %}
rainy
{% elif is_state('sensor.gweather_text', '曇のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text', '曇のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text', '曇のち雪') %}
snowy
{% elif is_state('sensor.gweather_text', '雨') %}
rainy
{% elif is_state('sensor.gweather_text', '大雨・嵐') %}
pouring
{% elif is_state('sensor.gweather_text', '小雨') %}
rainy
{% elif is_state('sensor.gweather_text', '雨時々晴') %}
rainy
{% elif is_state('sensor.gweather_text', '雨時々曇') %}
rainy
{% elif is_state('sensor.gweather_text', '雨時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text', '雨一時雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text', '雨のち晴') %}
rainy
{% elif is_state('sensor.gweather_text', '雨のち曇') %}
rainy
{% elif is_state('sensor.gweather_text', '雨のち時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text', '雨のち雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text', 'みぞれ') %}
hail
{% elif is_state('sensor.gweather_text', '雪') %}
snowy
{% elif is_state('sensor.gweather_text', '雪時々晴') %}
snowy
{% elif is_state('sensor.gweather_text', '雪時々曇') %}
snowy
{% elif is_state('sensor.gweather_text', '雪時々雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text', '雪一時雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text', '雪のち晴') %}
snowy
{% elif is_state('sensor.gweather_text', '雪のち曇') %}
snowy
{% elif is_state('sensor.gweather_text', '雪のち雨') %}
snowy-rainy
{% endif %}
gweather_condition_day_0:
unique_id: gweather_condition_day_0
value_template: >-
{% if is_state('sensor.gweather_text_day_0', '晴') %}
sunny
{% elif is_state('sensor.gweather_text_day_0', '猛暑') %}
sunny
{% elif is_state('sensor.gweather_text_day_0', '晴時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_0', '晴朝夕曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_0', '晴一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_0', '晴一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_0', '晴のち時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_0', '晴のち曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_0', '晴のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_0', '晴のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_0', '晴のち雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_0', '晴のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_0', '晴のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_0', '晴のち雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_0', '曇') %}
cloudy
{% elif is_state('sensor.gweather_text_day_0', '霧') %}
fog
{% elif is_state('sensor.gweather_text_day_0', '曇時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_0', '曇一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_0', '曇時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_0', '曇一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_0', '曇時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_0', '曇のち時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_0', '曇のち晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_0', '曇のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_0', '曇のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_0', '曇のち雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_0', '曇のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_0', '曇のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_0', '曇のち雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_0', '雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_0', '大雨・嵐') %}
pouring
{% elif is_state('sensor.gweather_text_day_0', '小雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_0', '雨時々晴') %}
rainy
{% elif is_state('sensor.gweather_text_day_0', '雨時々曇') %}
rainy
{% elif is_state('sensor.gweather_text_day_0', '雨時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_0', '雨一時雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_0', '雨のち晴') %}
rainy
{% elif is_state('sensor.gweather_text_day_0', '雨のち曇') %}
rainy
{% elif is_state('sensor.gweather_text_day_0', '雨のち時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_0', '雨のち雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_0', 'みぞれ') %}
hail
{% elif is_state('sensor.gweather_text_day_0', '雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_0', '雪時々晴') %}
snowy
{% elif is_state('sensor.gweather_text_day_0', '雪時々曇') %}
snowy
{% elif is_state('sensor.gweather_text_day_0', '雪時々雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_0', '雪一時雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_0', '雪のち晴') %}
snowy
{% elif is_state('sensor.gweather_text_day_0', '雪のち曇') %}
snowy
{% elif is_state('sensor.gweather_text_day_0', '雪のち雨') %}
snowy-rainy
{% endif %}
gweather_condition_day_1:
unique_id: gweather_condition_day_1
value_template: >-
{% if is_state('sensor.gweather_text_day_1', '晴') %}
sunny
{% elif is_state('sensor.gweather_text_day_1', '猛暑') %}
sunny
{% elif is_state('sensor.gweather_text_day_1', '晴時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_1', '晴朝夕曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_1', '晴一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_1', '晴一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_1', '晴のち時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_1', '晴のち曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_1', '晴のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_1', '晴のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_1', '晴のち雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_1', '晴のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_1', '晴のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_1', '晴のち雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_1', '曇') %}
cloudy
{% elif is_state('sensor.gweather_text_day_1', '霧') %}
fog
{% elif is_state('sensor.gweather_text_day_1', '曇時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_1', '曇一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_1', '曇時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_1', '曇一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_1', '曇時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_1', '曇のち時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_1', '曇のち晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_1', '曇のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_1', '曇のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_1', '曇のち雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_1', '曇のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_1', '曇のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_1', '曇のち雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_1', '雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_1', '大雨・嵐') %}
pouring
{% elif is_state('sensor.gweather_text_day_1', '小雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_1', '雨時々晴') %}
rainy
{% elif is_state('sensor.gweather_text_day_1', '雨時々曇') %}
rainy
{% elif is_state('sensor.gweather_text_day_1', '雨時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_1', '雨一時雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_1', '雨のち晴') %}
rainy
{% elif is_state('sensor.gweather_text_day_1', '雨のち曇') %}
rainy
{% elif is_state('sensor.gweather_text_day_1', '雨のち時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_1', '雨のち雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_1', 'みぞれ') %}
hail
{% elif is_state('sensor.gweather_text_day_1', '雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_1', '雪時々晴') %}
snowy
{% elif is_state('sensor.gweather_text_day_1', '雪時々曇') %}
snowy
{% elif is_state('sensor.gweather_text_day_1', '雪時々雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_1', '雪一時雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_1', '雪のち晴') %}
snowy
{% elif is_state('sensor.gweather_text_day_1', '雪のち曇') %}
snowy
{% elif is_state('sensor.gweather_text_day_1', '雪のち雨') %}
snowy-rainy
{% endif %}
gweather_condition_day_2:
unique_id: gweather_condition_day_2
value_template: >-
{% if is_state('sensor.gweather_text_day_2', '晴') %}
sunny
{% elif is_state('sensor.gweather_text_day_2', '猛暑') %}
sunny
{% elif is_state('sensor.gweather_text_day_2', '晴時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_2', '晴朝夕曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_2', '晴一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_2', '晴一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_2', '晴のち時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_2', '晴のち曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_2', '晴のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_2', '晴のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_2', '晴のち雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_2', '晴のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_2', '晴のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_2', '晴のち雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_2', '曇') %}
cloudy
{% elif is_state('sensor.gweather_text_day_2', '霧') %}
fog
{% elif is_state('sensor.gweather_text_day_2', '曇時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_2', '曇一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_2', '曇時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_2', '曇一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_2', '曇時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_2', '曇のち時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_2', '曇のち晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_2', '曇のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_2', '曇のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_2', '曇のち雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_2', '曇のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_2', '曇のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_2', '曇のち雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_2', '雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_2', '大雨・嵐') %}
pouring
{% elif is_state('sensor.gweather_text_day_2', '小雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_2', '雨時々晴') %}
rainy
{% elif is_state('sensor.gweather_text_day_2', '雨時々曇') %}
rainy
{% elif is_state('sensor.gweather_text_day_2', '雨時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_2', '雨一時雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_2', '雨のち晴') %}
rainy
{% elif is_state('sensor.gweather_text_day_2', '雨のち曇') %}
rainy
{% elif is_state('sensor.gweather_text_day_2', '雨のち時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_2', '雨のち雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_2', 'みぞれ') %}
hail
{% elif is_state('sensor.gweather_text_day_2', '雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_2', '雪時々晴') %}
snowy
{% elif is_state('sensor.gweather_text_day_2', '雪時々曇') %}
snowy
{% elif is_state('sensor.gweather_text_day_2', '雪時々雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_2', '雪一時雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_2', '雪のち晴') %}
snowy
{% elif is_state('sensor.gweather_text_day_2', '雪のち曇') %}
snowy
{% elif is_state('sensor.gweather_text_day_2', '雪のち雨') %}
snowy-rainy
{% endif %}
gweather_condition_day_3:
unique_id: gweather_condition_day_3
value_template: >-
{% if is_state('sensor.gweather_text_day_3', '晴') %}
sunny
{% elif is_state('sensor.gweather_text_day_3', '猛暑') %}
sunny
{% elif is_state('sensor.gweather_text_day_3', '晴時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_3', '晴朝夕曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_3', '晴一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_3', '晴一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_3', '晴のち時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_3', '晴のち曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_3', '晴のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_3', '晴のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_3', '晴のち雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_3', '晴のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_3', '晴のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_3', '晴のち雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_3', '曇') %}
cloudy
{% elif is_state('sensor.gweather_text_day_3', '霧') %}
fog
{% elif is_state('sensor.gweather_text_day_3', '曇時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_3', '曇一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_3', '曇時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_3', '曇一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_3', '曇時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_3', '曇のち時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_3', '曇のち晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_3', '曇のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_3', '曇のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_3', '曇のち雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_3', '曇のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_3', '曇のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_3', '曇のち雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_3', '雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_3', '大雨・嵐') %}
pouring
{% elif is_state('sensor.gweather_text_day_3', '小雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_3', '雨時々晴') %}
rainy
{% elif is_state('sensor.gweather_text_day_3', '雨時々曇') %}
rainy
{% elif is_state('sensor.gweather_text_day_3', '雨時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_3', '雨一時雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_3', '雨のち晴') %}
rainy
{% elif is_state('sensor.gweather_text_day_3', '雨のち曇') %}
rainy
{% elif is_state('sensor.gweather_text_day_3', '雨のち時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_3', '雨のち雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_3', 'みぞれ') %}
hail
{% elif is_state('sensor.gweather_text_day_3', '雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_3', '雪時々晴') %}
snowy
{% elif is_state('sensor.gweather_text_day_3', '雪時々曇') %}
snowy
{% elif is_state('sensor.gweather_text_day_3', '雪時々雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_3', '雪一時雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_3', '雪のち晴') %}
snowy
{% elif is_state('sensor.gweather_text_day_3', '雪のち曇') %}
snowy
{% elif is_state('sensor.gweather_text_day_3', '雪のち雨') %}
snowy-rainy
{% endif %}
gweather_condition_day_4:
unique_id: gweather_condition_day_4
value_template: >-
{% if is_state('sensor.gweather_text_day_4', '晴') %}
sunny
{% elif is_state('sensor.gweather_text_day_4', '猛暑') %}
sunny
{% elif is_state('sensor.gweather_text_day_4', '晴時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_4', '晴朝夕曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_4', '晴一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_4', '晴一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_4', '晴のち時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_4', '晴のち曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_4', '晴のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_4', '晴のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_4', '晴のち雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_4', '晴のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_4', '晴のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_4', '晴のち雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_4', '曇') %}
cloudy
{% elif is_state('sensor.gweather_text_day_4', '霧') %}
fog
{% elif is_state('sensor.gweather_text_day_4', '曇時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_4', '曇一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_4', '曇時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_4', '曇一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_4', '曇時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_4', '曇のち時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_4', '曇のち晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_4', '曇のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_4', '曇のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_4', '曇のち雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_4', '曇のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_4', '曇のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_4', '曇のち雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_4', '雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_4', '大雨・嵐') %}
pouring
{% elif is_state('sensor.gweather_text_day_4', '小雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_4', '雨時々晴') %}
rainy
{% elif is_state('sensor.gweather_text_day_4', '雨時々曇') %}
rainy
{% elif is_state('sensor.gweather_text_day_4', '雨時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_4', '雨一時雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_4', '雨のち晴') %}
rainy
{% elif is_state('sensor.gweather_text_day_4', '雨のち曇') %}
rainy
{% elif is_state('sensor.gweather_text_day_4', '雨のち時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_4', '雨のち雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_4', 'みぞれ') %}
hail
{% elif is_state('sensor.gweather_text_day_4', '雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_4', '雪時々晴') %}
snowy
{% elif is_state('sensor.gweather_text_day_4', '雪時々曇') %}
snowy
{% elif is_state('sensor.gweather_text_day_4', '雪時々雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_4', '雪一時雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_4', '雪のち晴') %}
snowy
{% elif is_state('sensor.gweather_text_day_4', '雪のち曇') %}
snowy
{% elif is_state('sensor.gweather_text_day_4', '雪のち雨') %}
snowy-rainy
{% endif %}
gweather_condition_day_5:
unique_id: gweather_condition_day_5
value_template: >-
{% if is_state('sensor.gweather_text_day_5', '晴') %}
sunny
{% elif is_state('sensor.gweather_text_day_5', '猛暑') %}
sunny
{% elif is_state('sensor.gweather_text_day_5', '晴時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_5', '晴朝夕曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_5', '晴一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_5', '晴一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_5', '晴のち時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_5', '晴のち曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_5', '晴のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_5', '晴のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_5', '晴のち雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_5', '晴のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_5', '晴のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_5', '晴のち雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_5', '曇') %}
cloudy
{% elif is_state('sensor.gweather_text_day_5', '霧') %}
fog
{% elif is_state('sensor.gweather_text_day_5', '曇時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_5', '曇一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_5', '曇時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_5', '曇一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_5', '曇時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_5', '曇のち時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_5', '曇のち晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_5', '曇のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_5', '曇のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_5', '曇のち雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_5', '曇のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_5', '曇のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_5', '曇のち雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_5', '雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_5', '大雨・嵐') %}
pouring
{% elif is_state('sensor.gweather_text_day_5', '小雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_5', '雨時々晴') %}
rainy
{% elif is_state('sensor.gweather_text_day_5', '雨時々曇') %}
rainy
{% elif is_state('sensor.gweather_text_day_5', '雨時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_5', '雨一時雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_5', '雨のち晴') %}
rainy
{% elif is_state('sensor.gweather_text_day_5', '雨のち曇') %}
rainy
{% elif is_state('sensor.gweather_text_day_5', '雨のち時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_5', '雨のち雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_5', 'みぞれ') %}
hail
{% elif is_state('sensor.gweather_text_day_5', '雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_5', '雪時々晴') %}
snowy
{% elif is_state('sensor.gweather_text_day_5', '雪時々曇') %}
snowy
{% elif is_state('sensor.gweather_text_day_5', '雪時々雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_5', '雪一時雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_5', '雪のち晴') %}
snowy
{% elif is_state('sensor.gweather_text_day_5', '雪のち曇') %}
snowy
{% elif is_state('sensor.gweather_text_day_5', '雪のち雨') %}
snowy-rainy
{% endif %}
gweather_condition_day_6:
unique_id: gweather_condition_day_6
value_template: >-
{% if is_state('sensor.gweather_text_day_6', '晴') %}
sunny
{% elif is_state('sensor.gweather_text_day_6', '猛暑') %}
sunny
{% elif is_state('sensor.gweather_text_day_6', '晴時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_6', '晴朝夕曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_6', '晴一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_6', '晴一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_6', '晴のち時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_6', '晴のち曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_6', '晴のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_6', '晴のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_6', '晴のち雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_6', '晴のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_6', '晴のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_6', '晴のち雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_6', '曇') %}
cloudy
{% elif is_state('sensor.gweather_text_day_6', '霧') %}
fog
{% elif is_state('sensor.gweather_text_day_6', '曇時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_6', '曇一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_6', '曇時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_6', '曇一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_6', '曇時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_6', '曇のち時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_6', '曇のち晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_6', '曇のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_6', '曇のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_6', '曇のち雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_6', '曇のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_6', '曇のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_6', '曇のち雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_6', '雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_6', '大雨・嵐') %}
pouring
{% elif is_state('sensor.gweather_text_day_6', '小雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_6', '雨時々晴') %}
rainy
{% elif is_state('sensor.gweather_text_day_6', '雨時々曇') %}
rainy
{% elif is_state('sensor.gweather_text_day_6', '雨時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_6', '雨一時雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_6', '雨のち晴') %}
rainy
{% elif is_state('sensor.gweather_text_day_6', '雨のち曇') %}
rainy
{% elif is_state('sensor.gweather_text_day_6', '雨のち時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_6', '雨のち雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_6', 'みぞれ') %}
hail
{% elif is_state('sensor.gweather_text_day_6', '雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_6', '雪時々晴') %}
snowy
{% elif is_state('sensor.gweather_text_day_6', '雪時々曇') %}
snowy
{% elif is_state('sensor.gweather_text_day_6', '雪時々雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_6', '雪一時雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_6', '雪のち晴') %}
snowy
{% elif is_state('sensor.gweather_text_day_6', '雪のち曇') %}
snowy
{% elif is_state('sensor.gweather_text_day_6', '雪のち雨') %}
snowy-rainy
{% endif %}
gweather_condition_day_7:
unique_id: gweather_condition_day_7
value_template: >-
{% if is_state('sensor.gweather_text_day_7', '晴') %}
sunny
{% elif is_state('sensor.gweather_text_day_7', '猛暑') %}
sunny
{% elif is_state('sensor.gweather_text_day_7', '晴時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_7', '晴朝夕曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_7', '晴一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_7', '晴一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_7', '晴のち時々曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_7', '晴のち曇') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_7', '晴のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_7', '晴のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_7', '晴のち雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_7', '晴のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_7', '晴のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_7', '晴のち雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_7', '曇') %}
cloudy
{% elif is_state('sensor.gweather_text_day_7', '霧') %}
fog
{% elif is_state('sensor.gweather_text_day_7', '曇時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_7', '曇一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_7', '曇時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_7', '曇一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_7', '曇時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_7', '曇のち時々晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_7', '曇のち晴') %}
partlycloudy
{% elif is_state('sensor.gweather_text_day_7', '曇のち一時雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_7', '曇のち時々雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_7', '曇のち雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_7', '曇のち一時雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_7', '曇のち時々雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_7', '曇のち雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_7', '雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_7', '大雨・嵐') %}
pouring
{% elif is_state('sensor.gweather_text_day_7', '小雨') %}
rainy
{% elif is_state('sensor.gweather_text_day_7', '雨時々晴') %}
rainy
{% elif is_state('sensor.gweather_text_day_7', '雨時々曇') %}
rainy
{% elif is_state('sensor.gweather_text_day_7', '雨時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_7', '雨一時雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_7', '雨のち晴') %}
rainy
{% elif is_state('sensor.gweather_text_day_7', '雨のち曇') %}
rainy
{% elif is_state('sensor.gweather_text_day_7', '雨のち時々雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_7', '雨のち雪') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_7', 'みぞれ') %}
hail
{% elif is_state('sensor.gweather_text_day_7', '雪') %}
snowy
{% elif is_state('sensor.gweather_text_day_7', '雪時々晴') %}
snowy
{% elif is_state('sensor.gweather_text_day_7', '雪時々曇') %}
snowy
{% elif is_state('sensor.gweather_text_day_7', '雪時々雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_7', '雪一時雨') %}
snowy-rainy
{% elif is_state('sensor.gweather_text_day_7', '雪のち晴') %}
snowy
{% elif is_state('sensor.gweather_text_day_7', '雪のち曇') %}
snowy
{% elif is_state('sensor.gweather_text_day_7', '雪のち雨') %}
snowy-rainy
{% endif %}
gweather_icon:
unique_id: gweather_icon
friendly_name: Weather Forecast
value_template: "{{ states('sensor.gweather_text') }} / {{ states('sensor.gweather_temperature') }}°C"
icon_template: >-
{% if is_state('sensor.gweather_condition', 'cloudy') %}
mdi:weather-cloudy
{% elif is_state('sensor.gweather_condition', 'fog') %}
mdi:weather-fog
{% elif is_state('sensor.gweather_condition', 'hail') %}
mdi:weather-hail
{% elif is_state('sensor.gweather_condition', 'partlycloudy') %}
mdi:weather-partly-cloudy
{% elif is_state('sensor.gweather_condition', 'pouring') %}
mdi:weather-pouring
{% elif is_state('sensor.gweather_condition', 'rainy') %}
mdi:weather-rainy
{% elif is_state('sensor.gweather_condition', 'snowy') %}
mdi:weather-snowy
{% elif is_state('sensor.gweather_condition', 'snowy-rainy') %}
mdi:weather-snowy-rainy
{% elif is_state('sensor.gweather_condition', 'sunny') %}
mdi:weather-sunny
{% endif %}
表示例
weather.gweather
sensor.gweather_icon
type: custom:mushroom-chips-card
chips:
- type: entity
entity: sensor.gweather_icon
tap_action:
action: url
url_path: https://www.google.com/search?q=weather&hl=ja
Discussion