Get Litter-Robot to 100% code coverage and minor code cleanup (#58704)
This commit is contained in:
parent
bbbbcfbb93
commit
aacc009cbb
6 changed files with 35 additions and 18 deletions
|
@ -23,14 +23,14 @@ async def async_setup_entry(
|
|||
"""Set up Litter-Robot selects using config entry."""
|
||||
hub: LitterRobotHub = hass.data[DOMAIN][config_entry.entry_id]
|
||||
|
||||
entities = [
|
||||
LitterRobotSelect(
|
||||
robot=robot, entity_type=TYPE_CLEAN_CYCLE_WAIT_TIME_MINUTES, hub=hub
|
||||
)
|
||||
for robot in hub.account.robots
|
||||
]
|
||||
|
||||
async_add_entities(entities)
|
||||
async_add_entities(
|
||||
[
|
||||
LitterRobotSelect(
|
||||
robot=robot, entity_type=TYPE_CLEAN_CYCLE_WAIT_TIME_MINUTES, hub=hub
|
||||
)
|
||||
for robot in hub.account.robots
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
class LitterRobotSelect(LitterRobotControlEntity, SelectEntity):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue