Roborock fix "selected map" when first map in list is selected (#127126)
* avoid None when current_map = 0 * combine statements
This commit is contained in:
parent
5bf5545394
commit
963b9d9a83
1 changed files with 1 additions and 1 deletions
|
@ -148,6 +148,6 @@ class RoborockCurrentMapSelectEntity(RoborockCoordinatedEntityV1, SelectEntity):
|
||||||
@property
|
@property
|
||||||
def current_option(self) -> str | None:
|
def current_option(self) -> str | None:
|
||||||
"""Get the current status of the select entity from device_status."""
|
"""Get the current status of the select entity from device_status."""
|
||||||
if current_map := self.coordinator.current_map:
|
if (current_map := self.coordinator.current_map) is not None:
|
||||||
return self.coordinator.maps[current_map].name
|
return self.coordinator.maps[current_map].name
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Add table
Reference in a new issue