Fix Z-Wave reset accumulated values button entity category (#144459)

This commit is contained in:
Martin Hjelmare 2025-05-08 11:59:20 +02:00 committed by GitHub
parent 678e25d0b1
commit bbc3862fec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -1204,7 +1204,7 @@ DISCOVERY_SCHEMAS = [
property={RESET_METER_PROPERTY}, property={RESET_METER_PROPERTY},
type={ValueType.BOOLEAN}, type={ValueType.BOOLEAN},
), ),
entity_category=EntityCategory.DIAGNOSTIC, entity_category=EntityCategory.CONFIG,
), ),
ZWaveDiscoverySchema( ZWaveDiscoverySchema(
platform=Platform.BINARY_SENSOR, platform=Platform.BINARY_SENSOR,

View File

@ -431,10 +431,11 @@ async def test_rediscovery(
async def test_aeotec_smart_switch_7( async def test_aeotec_smart_switch_7(
hass: HomeAssistant, hass: HomeAssistant,
entity_registry: er.EntityRegistry,
aeotec_smart_switch_7: Node, aeotec_smart_switch_7: Node,
integration: MockConfigEntry, integration: MockConfigEntry,
) -> None: ) -> None:
"""Test that Smart Switch 7 has a light and a switch entity.""" """Test Smart Switch 7 discovery."""
state = hass.states.get("light.smart_switch_7") state = hass.states.get("light.smart_switch_7")
assert state assert state
assert state.attributes[ATTR_SUPPORTED_COLOR_MODES] == [ assert state.attributes[ATTR_SUPPORTED_COLOR_MODES] == [
@ -443,3 +444,9 @@ async def test_aeotec_smart_switch_7(
state = hass.states.get("switch.smart_switch_7") state = hass.states.get("switch.smart_switch_7")
assert state assert state
state = hass.states.get("button.smart_switch_7_reset_accumulated_values")
assert state
entity_entry = entity_registry.async_get(state.entity_id)
assert entity_entry
assert entity_entry.entity_category is EntityCategory.CONFIG