Set options for alarm sensor in SmartThings (#139345)

* Set options for alarm sensor in SmartThings

* Set options for alarm sensor in SmartThings

* Fix
This commit is contained in:
Joost Lekkerkerker 2025-02-26 16:18:59 +01:00 committed by GitHub
parent 37c8764426
commit bd80a78848
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 25 additions and 3 deletions

View File

@ -112,6 +112,8 @@ CAPABILITY_TO_SENSORS: dict[
SmartThingsSensorEntityDescription(
key=Attribute.ALARM,
translation_key="alarm",
options=["both", "strobe", "siren", "off"],
device_class=SensorDeviceClass.ENUM,
)
]
},

View File

@ -49,7 +49,13 @@
"name": "Air quality"
},
"alarm": {
"name": "Alarm"
"name": "Alarm",
"state": {
"both": "Strobe and siren",
"strobe": "Strobe",
"siren": "Siren",
"off": "[%key:common::state::off%]"
}
},
"audio_volume": {
"name": "Volume"

View File

@ -263,7 +263,14 @@
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'capabilities': dict({
'options': list([
'both',
'strobe',
'siren',
'off',
]),
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
@ -281,7 +288,7 @@
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_device_class': <SensorDeviceClass.ENUM: 'enum'>,
'original_icon': None,
'original_name': 'Alarm',
'platform': 'smartthings',
@ -295,7 +302,14 @@
# name: test_all_entities[c2c_arlo_pro_3_switch][sensor.2nd_floor_hallway_alarm-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'enum',
'friendly_name': '2nd Floor Hallway Alarm',
'options': list([
'both',
'strobe',
'siren',
'off',
]),
}),
'context': <ANY>,
'entity_id': 'sensor.2nd_floor_hallway_alarm',