made current_scene more explicit
This commit is contained in:
@@ -206,8 +206,10 @@ class RoomController(Hass, Mqtt):
|
|||||||
return self.states[0]
|
return self.states[0]
|
||||||
|
|
||||||
async def current_scene(self, time: time = None) -> Dict[str, Dict[str, str | int]]:
|
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:
|
state = await self.current_state(time=time)
|
||||||
return state.scene
|
assert isinstance(state, RoomState)
|
||||||
|
self.log(f'Current scene: {state}')
|
||||||
|
return state.scene
|
||||||
|
|
||||||
async def app_entity_states(self) -> Dict[str, str]:
|
async def app_entity_states(self) -> Dict[str, str]:
|
||||||
states = {
|
states = {
|
||||||
|
|||||||
Reference in New Issue
Block a user