Skip to content

Commit f5694f6

Browse files
authored
fix slider max value (lbbrhzn#1563)
1 parent 45eb2ce commit f5694f6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

custom_components/ocpp/number.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,8 @@ async def async_setup_entry(hass, entry, async_add_devices):
6363

6464
for ent in NUMBERS:
6565
if ent.key == "maximum_current":
66-
ent.initial_value = entry.data.get(
67-
CONF_MAX_CURRENT, DEFAULT_MAX_CURRENT
68-
)
69-
ent.native_max_value = entry.data.get(
70-
CONF_MAX_CURRENT, DEFAULT_MAX_CURRENT
71-
)
66+
ent.initial_value = cp_id_settings[CONF_MAX_CURRENT]
67+
ent.native_max_value = cp_id_settings[CONF_MAX_CURRENT]
7268
cpx = ChargePointNumber(hass, central_system, cpid, ent)
7369
entities.append(cpx)
7470

0 commit comments

Comments
 (0)