84 lines
2.6 KiB
YAML
84 lines
2.6 KiB
YAML
text_sensor:
|
|
- platform: homeassistant
|
|
id: weather_condition
|
|
entity_id: weather.forecast_home
|
|
on_value:
|
|
then:
|
|
- lvgl.label.update:
|
|
id: status_condition_label
|
|
text: !lambda |-
|
|
if (x == "clear-night") return "Clear";
|
|
if (x == "cloudy") return "Cloudy";
|
|
if (x == "exceptional") return "Exceptional";
|
|
if (x == "fog") return "Foggy";
|
|
if (x == "hail") return "Hail";
|
|
if (x == "lightning") return "Lightning";
|
|
if (x == "lightning-rainy") return "Thunderstorms";
|
|
if (x == "partlycloudy") return "Partly Cloudy";
|
|
if (x == "pouring") return "Pouring Rain";
|
|
if (x == "rainy") return "Rainy";
|
|
if (x == "snowy") return "Snowy";
|
|
if (x == "snowy-rainy") return "Snow/Rain";
|
|
if (x == "sunny") return "Sunny";
|
|
if (x == "windy") return "Windy";
|
|
if (x == "windy-variant") return "Windy";
|
|
return x;
|
|
|
|
sensor:
|
|
- platform: homeassistant
|
|
id: weather_outside_temp
|
|
entity_id: weather.forecast_home
|
|
attribute: temperature
|
|
on_value:
|
|
then:
|
|
- lvgl.label.update:
|
|
id: outside_temp_label
|
|
text:
|
|
format: "%.0f °"
|
|
args: ["x"]
|
|
- lvgl.label.update:
|
|
id: status_temp_label
|
|
text:
|
|
format: "Outside: %.0f °F"
|
|
args: ["x"]
|
|
- platform: homeassistant
|
|
id: weather_humidity
|
|
entity_id: weather.forecast_home
|
|
attribute: humidity
|
|
on_value:
|
|
then:
|
|
- lvgl.label.update:
|
|
id: status_humidity_label
|
|
text:
|
|
format: "Humidity: %.0f%%"
|
|
args: ["x"]
|
|
- platform: homeassistant
|
|
id: weather_forecast_high
|
|
entity_id: sensor.firecrest_forecast_high
|
|
on_value:
|
|
then:
|
|
- lvgl.label.update:
|
|
id: status_high_label
|
|
text:
|
|
format: "High: %.0f °F"
|
|
args: ["x"]
|
|
- platform: homeassistant
|
|
id: weather_forecast_low
|
|
entity_id: sensor.firecrest_forecast_low
|
|
on_value:
|
|
then:
|
|
- lvgl.label.update:
|
|
id: status_low_label
|
|
text:
|
|
format: "Low: %.0f °F"
|
|
args: ["x"]
|
|
- platform: homeassistant
|
|
id: weather_precip_prob
|
|
entity_id: sensor.firecrest_precip_probability
|
|
on_value:
|
|
then:
|
|
- lvgl.label.update:
|
|
id: status_precip_label
|
|
text:
|
|
format: "Precipitation: %.0f%%"
|
|
args: ["x"]
|