mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Don't enable number of collisions by default for Husqvarna Automower (#131665)
This commit is contained in:
parent
a0893bb9f7
commit
055c38a3c8
@ -349,6 +349,7 @@ MOWER_SENSOR_TYPES: tuple[AutomowerSensorEntityDescription, ...] = (
|
|||||||
key="number_of_collisions",
|
key="number_of_collisions",
|
||||||
translation_key="number_of_collisions",
|
translation_key="number_of_collisions",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
|
entity_registry_enabled_default=False,
|
||||||
state_class=SensorStateClass.TOTAL,
|
state_class=SensorStateClass.TOTAL,
|
||||||
exists_fn=lambda data: data.statistics.number_of_collisions is not None,
|
exists_fn=lambda data: data.statistics.number_of_collisions is not None,
|
||||||
value_fn=attrgetter("statistics.number_of_collisions"),
|
value_fn=attrgetter("statistics.number_of_collisions"),
|
||||||
|
@ -111,6 +111,7 @@ async def test_work_area_sensor(
|
|||||||
assert state.state == "my_lawn"
|
assert state.state == "my_lawn"
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("sensor_to_test"),
|
("sensor_to_test"),
|
||||||
[
|
[
|
||||||
@ -167,6 +168,7 @@ async def test_error_sensor(
|
|||||||
assert state.state == expected_state
|
assert state.state == expected_state
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
||||||
async def test_sensor_snapshot(
|
async def test_sensor_snapshot(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
entity_registry: er.EntityRegistry,
|
entity_registry: er.EntityRegistry,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user