made current_scene more explicit

This commit is contained in:
John Lancaster
2024-01-21 10:53:55 -06:00
parent f00421d273
commit e973205b06

View File

@@ -206,8 +206,10 @@ class RoomController(Hass, Mqtt):
return self.states[0]
async def current_scene(self, time: time = None) -> Dict[str, Dict[str, str | int]]:
if (state := (await self.current_state(time=time))) is not None:
return state.scene
state = await self.current_state(time=time)
assert isinstance(state, RoomState)
self.log(f'Current scene: {state}')
return state.scene
async def app_entity_states(self) -> Dict[str, str]:
states = {