Skip to content

Commit fdfb789

Browse files
committed
v1.0.3: Update custom_components/solarmanager/select.py
1 parent a2c3037 commit fdfb789

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

custom_components/solarmanager/select.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
INVERTER_MODES,
1919
HEATPUMP_MODES,
2020
EV_CHARGER_MODES,
21+
EV_CHARGER_MODE_MAP,
2122
V2X_MODES,
2223
WATER_HEATER_MODES,
2324
)
@@ -107,10 +108,12 @@ async def async_setup_entry(
107108
client,
108109
SolarManagerSelectDescription(
109110
key=f"{sensor_id}_ev_mode",
110-
name=f"{sensor_name} Mode",
111+
name=f"{sensor_name} Charging Mode",
111112
icon="mdi:ev-station",
112113
options=EV_CHARGER_MODES,
113-
set_fn=lambda c, m, sid=sensor_id: c.set_ev_charger_mode(sid, m),
114+
set_fn=lambda c, m, sid=sensor_id: c.set_ev_charger_mode(
115+
sid, EV_CHARGER_MODE_MAP[m]
116+
),
114117
),
115118
dev_info, entry.entry_id,
116119
))

0 commit comments

Comments
 (0)