weather from HA v1.0

This commit is contained in:
Gabor Körber 2025-04-01 22:21:05 +02:00
parent 46e1767b16
commit 11fd08d37a

View File

@ -793,6 +793,12 @@ sensor:
entity_category: "diagnostic"
device_class: ""
- platform: homeassistant
name: "HA Weather Temperature"
entity_id: weather.home
attribute: temperature
id: ha_weather_temp
text_sensor:
- id: text_request
platform: template
@ -869,6 +875,13 @@ text_sensor:
on_value:
- component.update: s3_box_lcd
- platform: homeassistant
name: "Weather Condition"
entity_id: weather.home
attribute: condition
id: ha_weather_condition
i2s_audio:
- id: i2s_audio_bus
@ -1427,6 +1440,14 @@ font:
- "\U000F1A1B"#gas
- "\U000F1C3B"#battery charging/usb powered
- "\U000F1C6F"#info
- "\U000F0590" # weather-sunny
- "\U000F0591" # weather-partly-cloudy
- "\U000F0592" # weather-cloudy
- "\U000F0594" # weather-pouring
- "\U000F0596" # weather-lightning
- "\U000F0597" # weather-snowy
- "\U000F0F2F" # weather-night-partly-cloudy
- "\U000F0E6E" # weather-windy
- file: "https://github.com/BigBobbas/ESP32-S3-Box3-Custom-ESPHome/raw/main/fonts/materialdesignicons-webfont.ttf"
@ -1952,6 +1973,7 @@ display:
it.fill(Color::BLACK);
it.printf(160, 120, id(my_font4), yellow, TextAlign::CENTER, "Mic & Speaker - Muted");
# MARK: Screen Saver
- id: saver_page ##### screen saver display page #####
lambda: |-
it.fill(id(black));
@ -1964,7 +1986,12 @@ display:
} else {
it.strftime(160, 88, id(my_font2), TextAlign::CENTER, "%l:%M%p", id(ha_time).now());
}
it.printf(160, 181, id(my_font2), light_blue, TextAlign::CENTER, "%.f°C", id(s3temp).state); // remove for no sensor version
// Temperature from Home Assistant weather entity
it.printf(240, 181, id(my_font4), light_blue, TextAlign::CENTER, "%.f°C", id(ha_weather_temp).state);
// Weather condition (e.g. "partlycloudy", "sunny", etc.)
it.printf(240, 220, id(my_font4), light_blue, TextAlign::CENTER, "%s", id(ha_weather_condition).state.c_str());
// Device
it.printf(80, 181, id(my_font4), light_blue, TextAlign::CENTER, "%.f°C", id(s3temp).state);
- id: ota_page ##### firmware uploading page #####
lambda: |-