mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
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
@ -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…
x
Reference in New Issue
Block a user