mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Use identify device class in Elgato identify button entity (#95361)
* Use identify device class in Elgato identify button entity * Clean up strings
This commit is contained in:
parent
0fc51ac75a
commit
48776f86dc
@ -40,8 +40,7 @@ class ElgatoButtonEntityDescription(
|
|||||||
BUTTONS = [
|
BUTTONS = [
|
||||||
ElgatoButtonEntityDescription(
|
ElgatoButtonEntityDescription(
|
||||||
key="identify",
|
key="identify",
|
||||||
translation_key="identify",
|
device_class=ButtonDeviceClass.IDENTIFY,
|
||||||
icon="mdi:help",
|
|
||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
press_fn=lambda client: client.identify(),
|
press_fn=lambda client: client.identify(),
|
||||||
),
|
),
|
||||||
|
@ -23,11 +23,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"entity": {
|
"entity": {
|
||||||
"button": {
|
|
||||||
"identify": {
|
|
||||||
"name": "Identify"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sensor": {
|
"sensor": {
|
||||||
"charge_power": {
|
"charge_power": {
|
||||||
"name": "Charging power"
|
"name": "Charging power"
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
# name: test_buttons[button.frenck_identify-identify-key-light-mini]
|
# name: test_buttons[button.frenck_identify-identify-key-light-mini]
|
||||||
StateSnapshot({
|
StateSnapshot({
|
||||||
'attributes': ReadOnlyDict({
|
'attributes': ReadOnlyDict({
|
||||||
|
'device_class': 'identify',
|
||||||
'friendly_name': 'Frenck Identify',
|
'friendly_name': 'Frenck Identify',
|
||||||
'icon': 'mdi:help',
|
|
||||||
}),
|
}),
|
||||||
'context': <ANY>,
|
'context': <ANY>,
|
||||||
'entity_id': 'button.frenck_identify',
|
'entity_id': 'button.frenck_identify',
|
||||||
@ -32,12 +32,12 @@
|
|||||||
'name': None,
|
'name': None,
|
||||||
'options': dict({
|
'options': dict({
|
||||||
}),
|
}),
|
||||||
'original_device_class': None,
|
'original_device_class': <ButtonDeviceClass.IDENTIFY: 'identify'>,
|
||||||
'original_icon': 'mdi:help',
|
'original_icon': None,
|
||||||
'original_name': 'Identify',
|
'original_name': 'Identify',
|
||||||
'platform': 'elgato',
|
'platform': 'elgato',
|
||||||
'supported_features': 0,
|
'supported_features': 0,
|
||||||
'translation_key': 'identify',
|
'translation_key': None,
|
||||||
'unique_id': 'GW24L1A02987_identify',
|
'unique_id': 'GW24L1A02987_identify',
|
||||||
'unit_of_measurement': None,
|
'unit_of_measurement': None,
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user