mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-09 14:56:35 +01:00
Merge pull request #101 from gerard33/patch-2
Update weather part of screensaver
This commit is contained in:
@@ -19,6 +19,11 @@ nspanel-1:
|
|||||||
timeFormat: "%H:%M"
|
timeFormat: "%H:%M"
|
||||||
dateFormat: "%A, %d. %B %Y" # ignored if babel python package is installed
|
dateFormat: "%A, %d. %B %Y" # ignored if babel python package is installed
|
||||||
weather: weather.example
|
weather: weather.example
|
||||||
|
weatherOverrideForecast3: sensor.nas_cpu_perc
|
||||||
|
weatherOverrideForecast4:
|
||||||
|
sensor.solar_power_current: # use this for overriding name and icon
|
||||||
|
name: Sonne
|
||||||
|
icon: solar-power
|
||||||
pages:
|
pages:
|
||||||
- type: cardEntities
|
- type: cardEntities
|
||||||
heading: Example Page 1
|
heading: Example Page 1
|
||||||
@@ -56,4 +61,4 @@ nspanel-1:
|
|||||||
- type: cardMedia
|
- type: cardMedia
|
||||||
item: media_player.spotify_user
|
item: media_player.spotify_user
|
||||||
- type: cardAlarm
|
- type: cardAlarm
|
||||||
item: alarm_control_panel.alarmo
|
item: alarm_control_panel.alarmo
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class LuiPagesGen(object):
|
|||||||
if self._ha_api.entity_exists(we_name):
|
if self._ha_api.entity_exists(we_name):
|
||||||
we = self._ha_api.get_entity(we_name)
|
we = self._ha_api.get_entity(we_name)
|
||||||
else:
|
else:
|
||||||
LOGGER.error("Skipping Weather Update, entitiy not found")
|
LOGGER.error("Skipping Weather Update, entity not found")
|
||||||
return
|
return
|
||||||
|
|
||||||
icon_cur = get_icon_id_ha("weather", state=we.state)
|
icon_cur = get_icon_id_ha("weather", state=we.state)
|
||||||
@@ -82,7 +82,7 @@ class LuiPagesGen(object):
|
|||||||
icon = get_icon_id_ha("weather", state=we.attributes.forecast[i-1]['condition'])
|
icon = get_icon_id_ha("weather", state=we.attributes.forecast[i-1]['condition'])
|
||||||
down = f"{we.attributes.forecast[i-1]['temperature']} {unit}"
|
down = f"{we.attributes.forecast[i-1]['temperature']} {unit}"
|
||||||
else:
|
else:
|
||||||
LOGGER.info(f"Forecast 1 is overrriden with {wOF}")
|
LOGGER.info(f"Forecast {i} is overriden with {wOF}")
|
||||||
icon = None
|
icon = None
|
||||||
name = None
|
name = None
|
||||||
if type(wOF) is dict:
|
if type(wOF) is dict:
|
||||||
|
|||||||
Reference in New Issue
Block a user