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:
Franck Nijhof 2023-06-27 19:59:49 +02:00 committed by GitHub
parent 0fc51ac75a
commit 48776f86dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 11 deletions

View File

@ -40,8 +40,7 @@ class ElgatoButtonEntityDescription(
BUTTONS = [
ElgatoButtonEntityDescription(
key="identify",
translation_key="identify",
icon="mdi:help",
device_class=ButtonDeviceClass.IDENTIFY,
entity_category=EntityCategory.CONFIG,
press_fn=lambda client: client.identify(),
),

View File

@ -23,11 +23,6 @@
}
},
"entity": {
"button": {
"identify": {
"name": "Identify"
}
},
"sensor": {
"charge_power": {
"name": "Charging power"

View File

@ -2,8 +2,8 @@
# name: test_buttons[button.frenck_identify-identify-key-light-mini]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'identify',
'friendly_name': 'Frenck Identify',
'icon': 'mdi:help',
}),
'context': <ANY>,
'entity_id': 'button.frenck_identify',
@ -32,12 +32,12 @@
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': 'mdi:help',
'original_device_class': <ButtonDeviceClass.IDENTIFY: 'identify'>,
'original_icon': None,
'original_name': 'Identify',
'platform': 'elgato',
'supported_features': 0,
'translation_key': 'identify',
'translation_key': None,
'unique_id': 'GW24L1A02987_identify',
'unit_of_measurement': None,
})