mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Fix Z-Wave reset accumulated values button entity category (#144459)
This commit is contained in:
parent
a793503c8a
commit
e5c56629e2
@ -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,
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user