mirror of
https://github.com/Dielee/volvo2mqtt.git
synced 2026-08-12 10:49:52 +02:00
Move vehicles details endpoint to v2 // Try to fix #131
This commit is contained in:
@@ -270,8 +270,12 @@ def update_car_data(force_update=False, overwrite={}):
|
||||
def update_ha_device(entity, vin, state):
|
||||
icon_config = icon_states.get(entity["id"])
|
||||
if icon_config and state:
|
||||
logging.debug("Entity " + entity["id"] + " state " + str(state))
|
||||
if isinstance(state, float):
|
||||
icon = util.get_icon_between(icon_config, state)
|
||||
elif state.replace(".", "").isnumeric():
|
||||
state = float(state)
|
||||
icon = util.get_icon_between(icon_config, state)
|
||||
else:
|
||||
icon = icon_config[state]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user