Disable noisy diagnostic incomfort sensors by default (#135992)
parent
5ffae140af
commit
889f699e5d
|
@ -42,24 +42,28 @@ SENSOR_TYPES: tuple[IncomfortBinarySensorEntityDescription, ...] = (
|
|||
extra_state_attributes_fn=lambda status: {
|
||||
"fault_code": status["fault_code"] or "none",
|
||||
},
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
IncomfortBinarySensorEntityDescription(
|
||||
key="is_pumping",
|
||||
translation_key="is_pumping",
|
||||
device_class=BinarySensorDeviceClass.RUNNING,
|
||||
value_key="is_pumping",
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
IncomfortBinarySensorEntityDescription(
|
||||
key="is_burning",
|
||||
translation_key="is_burning",
|
||||
device_class=BinarySensorDeviceClass.RUNNING,
|
||||
value_key="is_burning",
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
IncomfortBinarySensorEntityDescription(
|
||||
key="is_tapping",
|
||||
translation_key="is_tapping",
|
||||
device_class=BinarySensorDeviceClass.RUNNING,
|
||||
value_key="is_tapping",
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ SENSOR_TYPES: tuple[IncomfortSensorEntityDescription, ...] = (
|
|||
state_class=SensorStateClass.MEASUREMENT,
|
||||
native_unit_of_measurement=UnitOfPressure.BAR,
|
||||
value_key="pressure",
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
IncomfortSensorEntityDescription(
|
||||
key="cv_temp",
|
||||
|
@ -49,6 +50,7 @@ SENSOR_TYPES: tuple[IncomfortSensorEntityDescription, ...] = (
|
|||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
extra_key="is_pumping",
|
||||
value_key="heater_temp",
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
IncomfortSensorEntityDescription(
|
||||
key="tap_temp",
|
||||
|
@ -58,6 +60,7 @@ SENSOR_TYPES: tuple[IncomfortSensorEntityDescription, ...] = (
|
|||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
extra_key="is_tapping",
|
||||
value_key="tap_temp",
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ from tests.common import snapshot_platform
|
|||
|
||||
|
||||
@patch("homeassistant.components.incomfort.PLATFORMS", [Platform.BINARY_SENSOR])
|
||||
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
||||
async def test_setup_platform(
|
||||
hass: HomeAssistant,
|
||||
mock_incomfort: MagicMock,
|
||||
|
@ -45,6 +46,7 @@ async def test_setup_platform(
|
|||
ids=["is_failed", "is_pumping", "is_burning", "is_tapping"],
|
||||
)
|
||||
@patch("homeassistant.components.incomfort.PLATFORMS", [Platform.BINARY_SENSOR])
|
||||
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
||||
async def test_setup_binary_sensors_alt(
|
||||
hass: HomeAssistant,
|
||||
mock_incomfort: MagicMock,
|
||||
|
|
|
@ -18,6 +18,7 @@ from homeassistant.helpers import entity_registry as er
|
|||
from tests.common import async_fire_time_changed
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
||||
async def test_setup_platforms(
|
||||
hass: HomeAssistant,
|
||||
mock_incomfort: MagicMock,
|
||||
|
@ -29,6 +30,7 @@ async def test_setup_platforms(
|
|||
assert mock_config_entry.state is ConfigEntryState.LOADED
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
||||
async def test_coordinator_updates(
|
||||
hass: HomeAssistant,
|
||||
mock_incomfort: MagicMock,
|
||||
|
@ -60,6 +62,7 @@ async def test_coordinator_updates(
|
|||
assert state.state == "1.84"
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
||||
@pytest.mark.parametrize(
|
||||
"exc",
|
||||
[
|
||||
|
@ -105,6 +108,7 @@ async def test_coordinator_update_fails(
|
|||
assert state.state == STATE_UNAVAILABLE
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
||||
@pytest.mark.parametrize(
|
||||
("exc", "config_entry_state"),
|
||||
[
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
from syrupy import SnapshotAssertion
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -12,6 +13,7 @@ from homeassistant.helpers import entity_registry as er
|
|||
from tests.common import snapshot_platform
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
||||
@patch("homeassistant.components.incomfort.PLATFORMS", [Platform.SENSOR])
|
||||
async def test_setup_platform(
|
||||
hass: HomeAssistant,
|
||||
|
|
Loading…
Reference in New Issue