changes for use_dictionary_unpacking

This commit is contained in:
John Lancaster
2024-08-27 00:42:19 -05:00
parent de31b6ca5a
commit a8e0b53c53
5 changed files with 136 additions and 4 deletions

View File

@@ -65,7 +65,7 @@ class SleepSetter(Hass, Mqtt):
assert isinstance(state, float)
return state
def handle_state(self, entity, attribute, old, new, kwargs):
def handle_state(self, entity, attribute, old, new, **kwargs):
self.log(f'new state: {self.state}')
if self.state:
self.all_off()
@@ -77,7 +77,7 @@ class SleepSetter(Hass, Mqtt):
self.log(f'Turned on scene: {self.scene}')
# self.turn_on(self.scene)
def handle_button(self, event_name, data, kwargs):
def handle_button(self, event_name, data, **kwargs):
topic = data['topic']
# self.log(f'Button event for: {topic}')
try: