From f48b535d9d9a4fbb5e21aed2e0047d67f940fcf3 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 7 Mar 2023 16:15:48 +0100 Subject: [PATCH] Drop deepcopy of manual alarm control panel config (#89286) --- homeassistant/components/manual/alarm_control_panel.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/manual/alarm_control_panel.py b/homeassistant/components/manual/alarm_control_panel.py index d35f9b73ef3..f0436ba1d69 100644 --- a/homeassistant/components/manual/alarm_control_panel.py +++ b/homeassistant/components/manual/alarm_control_panel.py @@ -1,7 +1,6 @@ """Support for manual alarms.""" from __future__ import annotations -import copy import datetime import logging import re @@ -74,15 +73,16 @@ ATTR_NEXT_STATE = "next_state" def _state_validator(config): """Validate the state.""" - config = copy.deepcopy(config) for state in SUPPORTED_PRETRIGGER_STATES: if CONF_DELAY_TIME not in config[state]: - config[state][CONF_DELAY_TIME] = config[CONF_DELAY_TIME] + config[state] = config[state] | {CONF_DELAY_TIME: config[CONF_DELAY_TIME]} if CONF_TRIGGER_TIME not in config[state]: - config[state][CONF_TRIGGER_TIME] = config[CONF_TRIGGER_TIME] + config[state] = config[state] | { + CONF_TRIGGER_TIME: config[CONF_TRIGGER_TIME] + } for state in SUPPORTED_ARMING_STATES: if CONF_ARMING_TIME not in config[state]: - config[state][CONF_ARMING_TIME] = config[CONF_ARMING_TIME] + config[state] = config[state] | {CONF_ARMING_TIME: config[CONF_ARMING_TIME]} return config