mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 01:07:10 +00:00
Use identify device class in ZHA identify button entity (#95373)
This commit is contained in:
parent
e7cc839a96
commit
43fe30f6ee
@ -105,7 +105,7 @@ class ZHAIdentifyButton(ZHAButton):
|
||||
return None
|
||||
return cls(unique_id, zha_device, cluster_handlers, **kwargs)
|
||||
|
||||
_attr_device_class: ButtonDeviceClass = ButtonDeviceClass.UPDATE
|
||||
_attr_device_class = ButtonDeviceClass.IDENTIFY
|
||||
_attr_entity_category = EntityCategory.DIAGNOSTIC
|
||||
_attr_name = "Identify"
|
||||
_command_name = "identify"
|
||||
|
@ -143,7 +143,7 @@ async def test_button(hass: HomeAssistant, contact_sensor) -> None:
|
||||
state = hass.states.get(entity_id)
|
||||
assert state
|
||||
assert state.state == STATE_UNKNOWN
|
||||
assert state.attributes[ATTR_DEVICE_CLASS] == ButtonDeviceClass.UPDATE
|
||||
assert state.attributes[ATTR_DEVICE_CLASS] == ButtonDeviceClass.IDENTIFY
|
||||
|
||||
entry = entity_registry.async_get(entity_id)
|
||||
assert entry
|
||||
@ -168,7 +168,7 @@ async def test_button(hass: HomeAssistant, contact_sensor) -> None:
|
||||
state = hass.states.get(entity_id)
|
||||
assert state
|
||||
assert state.state == "2021-11-04T16:37:00+00:00"
|
||||
assert state.attributes[ATTR_DEVICE_CLASS] == ButtonDeviceClass.UPDATE
|
||||
assert state.attributes[ATTR_DEVICE_CLASS] == ButtonDeviceClass.IDENTIFY
|
||||
|
||||
|
||||
async def test_frost_unlock(hass: HomeAssistant, tuya_water_valve) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user