From dda9d2b5016fb7275feaa9d9f1f7e508f68c4302 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Tue, 2 Jan 2024 21:54:20 -0600 Subject: [PATCH] small bugfix --- room_control.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/room_control.py b/room_control.py index 6db197b..9b288e7 100755 --- a/room_control.py +++ b/room_control.py @@ -195,7 +195,11 @@ class RoomController(Hass, Mqtt): @utils.sync_wrapper async def activate(self, entity = None, attribute = None, old = None, new = None, kwargs = None): - cause = kwargs.get('cause', 'unknown') + if kwargs is not None: + cause = kwargs.get('cause', 'unknown') + else: + cause = 'unknown' + self.log(f'Activating: {cause}') scene = await self.current_scene()