mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-23 07:54:25 +01:00
Add unit to forecast
This commit is contained in:
@@ -80,7 +80,7 @@ class LuiPagesGen(object):
|
|||||||
else:
|
else:
|
||||||
up1 = up1.strftime("%a")
|
up1 = up1.strftime("%a")
|
||||||
icon1 = get_icon_id_ha("weather", state=we.attributes.forecast[0]['condition'])
|
icon1 = get_icon_id_ha("weather", state=we.attributes.forecast[0]['condition'])
|
||||||
down1 = we.attributes.forecast[0]['temperature']
|
down1 = f"{we.attributes.forecast[0]['temperature']}{unit}"
|
||||||
else:
|
else:
|
||||||
LOGGER.info(f"Forecast 1 is overrriden with {wOF1}")
|
LOGGER.info(f"Forecast 1 is overrriden with {wOF1}")
|
||||||
icon = None
|
icon = None
|
||||||
@@ -105,7 +105,8 @@ class LuiPagesGen(object):
|
|||||||
else:
|
else:
|
||||||
up2 = up2.strftime("%a")
|
up2 = up2.strftime("%a")
|
||||||
icon2 = get_icon_id_ha("weather", state=we.attributes.forecast[1]['condition'])
|
icon2 = get_icon_id_ha("weather", state=we.attributes.forecast[1]['condition'])
|
||||||
down2 = we.attributes.forecast[1]['temperature']
|
down2 = f"{we.attributes.forecast[1]['temperature']}{unit}"
|
||||||
|
|
||||||
else:
|
else:
|
||||||
LOGGER.info(f"Forecast 2 is overrriden with {wOF2}")
|
LOGGER.info(f"Forecast 2 is overrriden with {wOF2}")
|
||||||
icon = None
|
icon = None
|
||||||
|
|||||||
Reference in New Issue
Block a user