mirror of
https://github.com/home-assistant/core.git
synced 2025-07-11 07:17:12 +00:00
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:
parent
37c8764426
commit
bd80a78848
@ -112,6 +112,8 @@ CAPABILITY_TO_SENSORS: dict[
|
|||||||
SmartThingsSensorEntityDescription(
|
SmartThingsSensorEntityDescription(
|
||||||
key=Attribute.ALARM,
|
key=Attribute.ALARM,
|
||||||
translation_key="alarm",
|
translation_key="alarm",
|
||||||
|
options=["both", "strobe", "siren", "off"],
|
||||||
|
device_class=SensorDeviceClass.ENUM,
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -49,7 +49,13 @@
|
|||||||
"name": "Air quality"
|
"name": "Air quality"
|
||||||
},
|
},
|
||||||
"alarm": {
|
"alarm": {
|
||||||
"name": "Alarm"
|
"name": "Alarm",
|
||||||
|
"state": {
|
||||||
|
"both": "Strobe and siren",
|
||||||
|
"strobe": "Strobe",
|
||||||
|
"siren": "Siren",
|
||||||
|
"off": "[%key:common::state::off%]"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"audio_volume": {
|
"audio_volume": {
|
||||||
"name": "Volume"
|
"name": "Volume"
|
||||||
|
@ -263,7 +263,14 @@
|
|||||||
'aliases': set({
|
'aliases': set({
|
||||||
}),
|
}),
|
||||||
'area_id': None,
|
'area_id': None,
|
||||||
'capabilities': None,
|
'capabilities': dict({
|
||||||
|
'options': list([
|
||||||
|
'both',
|
||||||
|
'strobe',
|
||||||
|
'siren',
|
||||||
|
'off',
|
||||||
|
]),
|
||||||
|
}),
|
||||||
'config_entry_id': <ANY>,
|
'config_entry_id': <ANY>,
|
||||||
'config_subentry_id': <ANY>,
|
'config_subentry_id': <ANY>,
|
||||||
'device_class': None,
|
'device_class': None,
|
||||||
@ -281,7 +288,7 @@
|
|||||||
'name': None,
|
'name': None,
|
||||||
'options': dict({
|
'options': dict({
|
||||||
}),
|
}),
|
||||||
'original_device_class': None,
|
'original_device_class': <SensorDeviceClass.ENUM: 'enum'>,
|
||||||
'original_icon': None,
|
'original_icon': None,
|
||||||
'original_name': 'Alarm',
|
'original_name': 'Alarm',
|
||||||
'platform': 'smartthings',
|
'platform': 'smartthings',
|
||||||
@ -295,7 +302,14 @@
|
|||||||
# name: test_all_entities[c2c_arlo_pro_3_switch][sensor.2nd_floor_hallway_alarm-state]
|
# name: test_all_entities[c2c_arlo_pro_3_switch][sensor.2nd_floor_hallway_alarm-state]
|
||||||
StateSnapshot({
|
StateSnapshot({
|
||||||
'attributes': ReadOnlyDict({
|
'attributes': ReadOnlyDict({
|
||||||
|
'device_class': 'enum',
|
||||||
'friendly_name': '2nd Floor Hallway Alarm',
|
'friendly_name': '2nd Floor Hallway Alarm',
|
||||||
|
'options': list([
|
||||||
|
'both',
|
||||||
|
'strobe',
|
||||||
|
'siren',
|
||||||
|
'off',
|
||||||
|
]),
|
||||||
}),
|
}),
|
||||||
'context': <ANY>,
|
'context': <ANY>,
|
||||||
'entity_id': 'sensor.2nd_floor_hallway_alarm',
|
'entity_id': 'sensor.2nd_floor_hallway_alarm',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user