mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-23 07:54:25 +01:00
Update nspanel-lovelace-ui.py
This commit is contained in:
@@ -345,10 +345,12 @@ class NsPanelLovelaceUI:
|
||||
|
||||
if item_type == "sensor":
|
||||
icon_id = 0
|
||||
unit_of_measurement = ""
|
||||
icon_mapping = {
|
||||
"temperature": 2,
|
||||
"power": 4
|
||||
}
|
||||
if "device_class" in entity.attributes:
|
||||
if entity.attributes.device_class in icon_mapping:
|
||||
icon_id = icon_mapping[entity.attributes.device_class]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user