From 6750a5b030323e13d8de0263ba0289abbe976b61 Mon Sep 17 00:00:00 2001 From: Claudiu Bucur Date: Sun, 16 Jun 2024 20:08:23 +0300 Subject: [PATCH] Home Assistant auto-discovery - set "code required" flags to false if no code provided --- paradox/interfaces/mqtt/entities/alarm_control_panel.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/paradox/interfaces/mqtt/entities/alarm_control_panel.py b/paradox/interfaces/mqtt/entities/alarm_control_panel.py index a91aeffa..43520571 100644 --- a/paradox/interfaces/mqtt/entities/alarm_control_panel.py +++ b/paradox/interfaces/mqtt/entities/alarm_control_panel.py @@ -26,6 +26,12 @@ def serialize(self): )) if self.code is not None: config['code']=self.code + else: + config.update(dict( + code_arm_required=False, + code_disarm_required=False, + code_trigger_required=False + )) return config @property