AlarmControlPanel code validation (#2191)

* AlarmControlPanel code validation

* title

* Apply suggestions from code review

* tweaks

* tweak

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
G Johansson 2024-05-29 11:19:03 +02:00 committed by GitHub
parent fd49ba3e01
commit e4fab6350e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,11 @@
---
author: G Johansson
authorURL: https://github.com/gjohansson-ST
title: Alarm Control Panel Entity code validation
---
The `AlarmControlPanelEntity` is now enforcing validation of code for alarm control panel entities, which set `code_arm_required` to `True` (default behavior). Service calls fail if no code is provided when a code is required.
Previously this was entirely optional, and a user could skip code entry regardless of it was needed by the integration or not (and as such each integration needed to implement its own check).
As the default behavior is that code is required, custom integrations that don't require a code input need to set `code_arm_required` to `False` or the user will always have to input a code regardless of if it's needed by the service calls.