Skip to content

Commit 7a488de

Browse files
committed
fix selection of led indicator
1 parent fafc29d commit 7a488de

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

custom_components/wiser/select.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry, async_add_entitie
5353
wiser_selects.extend(
5454
[WiserLightPowerOnBehaviourSelect(data, light.id)]
5555
)
56+
5657

5758
# Add Shutters
5859
if data.wiserhub.devices.shutters.count > 0:
@@ -346,7 +347,7 @@ def unique_id(self):
346347
return get_unique_id(
347348
self._data,
348349
self._device.product_type,
349-
"led-indicator",
350+
"led_indicator",
350351
self._device_id,
351352
)
352353

@@ -363,13 +364,14 @@ def current_option(self) -> str:
363364
async def async_select_option(self, option: str) -> None:
364365
_LOGGER.debug(f"Setting {self.name} to {option}")
365366
if option in self._options:
366-
await self.async_set_led_indicator(option)
367+
await self._device.set_led_indicator(option)
367368
await self.async_force_update()
368369
else:
369370
_LOGGER.error(
370371
f"{option} is not a valid {self.name}. Please choose from {self._options}"
371372
)
372373

374+
373375
class WiserSmartplugLedIndicatorSelect(WiserSelectEntity):
374376
def __init__(self, data, smartplug_id) -> None:
375377
"""Initialize the sensor."""

0 commit comments

Comments
 (0)