mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +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",
|
||||
translation_key="number_of_collisions",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
entity_registry_enabled_default=False,
|
||||
state_class=SensorStateClass.TOTAL,
|
||||
exists_fn=lambda data: data.statistics.number_of_collisions is not None,
|
||||
value_fn=attrgetter("statistics.number_of_collisions"),
|
||||
|
@ -111,6 +111,7 @@ async def test_work_area_sensor(
|
||||
assert state.state == "my_lawn"
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
||||
@pytest.mark.parametrize(
|
||||
("sensor_to_test"),
|
||||
[
|
||||
@ -167,6 +168,7 @@ async def test_error_sensor(
|
||||
assert state.state == expected_state
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
||||
async def test_sensor_snapshot(
|
||||
hass: HomeAssistant,
|
||||
entity_registry: er.EntityRegistry,
|
||||
|
Loading…
x
Reference in New Issue
Block a user