Fix SimpliSafe service calls that require a device selector (#83200)

fixes undefined
This commit is contained in:
Aaron Bach 2022-12-03 12:20:53 -07:00 committed by GitHub
parent b735e66d2f
commit c6ad48e236
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -237,11 +237,12 @@ def _async_get_system_for_service_call(
) is None:
raise ValueError("No base station registered for alarm control panel")
[system_id] = [
[system_id_str] = [
identity[1]
for identity in base_station_device_entry.identifiers
if identity[0] == DOMAIN
]
system_id = int(system_id_str)
for entry_id in base_station_device_entry.config_entries:
if (simplisafe := hass.data[DOMAIN].get(entry_id)) is None:

View File

@ -10,7 +10,8 @@ remove_pin:
selector:
device:
integration: simplisafe
model: alarm_control_panel
entity:
domain: alarm_control_panel
label_or_pin:
name: Label/PIN
description: The label/value to remove.
@ -29,7 +30,8 @@ set_pin:
selector:
device:
integration: simplisafe
model: alarm_control_panel
entity:
domain: alarm_control_panel
label:
name: Label
description: The label of the PIN
@ -55,7 +57,8 @@ set_system_properties:
selector:
device:
integration: simplisafe
model: alarm_control_panel
entity:
domain: alarm_control_panel
alarm_duration:
name: Alarm duration
description: The length of a triggered alarm