added manual mode
This commit is contained in:
@@ -54,6 +54,10 @@ class Button(Mqtt):
|
||||
if action == 'single':
|
||||
state = self.get_state(self.args['ref_entity'])
|
||||
kwargs = {'kwargs': {'cause': f'button single click: toggle while {state}'}}
|
||||
|
||||
if manual_entity := self.args.get('manual_mode'):
|
||||
self.set_state(entity_id=manual_entity, state='off')
|
||||
|
||||
if state == 'on':
|
||||
self.app.deactivate(**kwargs)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user