diff --git a/room_control.py b/room_control.py index 2e36dc5..152418b 100755 --- a/room_control.py +++ b/room_control.py @@ -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 = {