mirror of
https://github.com/home-assistant/core.git
synced 2025-07-31 09:17:10 +00:00
Rename threshold_level
key to concentration_status
This commit is contained in:
parent
c272a596ae
commit
942ba37a79
@ -75,8 +75,8 @@ SENSOR_DESCRIPTIONS = {
|
|||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
),
|
),
|
||||||
"status": AranetSensorEntityDescription(
|
"status": AranetSensorEntityDescription(
|
||||||
key="threshold_level",
|
key="concentration_status",
|
||||||
name="Threshold Level",
|
name="Concentration Status",
|
||||||
device_class=SensorDeviceClass.ENUM,
|
device_class=SensorDeviceClass.ENUM,
|
||||||
),
|
),
|
||||||
"co2": AranetSensorEntityDescription(
|
"co2": AranetSensorEntityDescription(
|
||||||
|
@ -214,10 +214,12 @@ async def test_sensors_aranet4(
|
|||||||
assert interval_sensor_attrs[ATTR_UNIT_OF_MEASUREMENT] == "s"
|
assert interval_sensor_attrs[ATTR_UNIT_OF_MEASUREMENT] == "s"
|
||||||
assert interval_sensor_attrs[ATTR_STATE_CLASS] == "measurement"
|
assert interval_sensor_attrs[ATTR_STATE_CLASS] == "measurement"
|
||||||
|
|
||||||
status_sensor = hass.states.get("sensor.aranet4_12345_threshold_level")
|
status_sensor = hass.states.get("sensor.aranet4_12345_concentration_status")
|
||||||
status_sensor_attrs = status_sensor.attributes
|
status_sensor_attrs = status_sensor.attributes
|
||||||
assert status_sensor.state == "Good"
|
assert status_sensor.state == "Good"
|
||||||
assert status_sensor_attrs[ATTR_FRIENDLY_NAME] == "Aranet4 12345 Threshold Level"
|
assert (
|
||||||
|
status_sensor_attrs[ATTR_FRIENDLY_NAME] == "Aranet4 12345 Concentration Status"
|
||||||
|
)
|
||||||
|
|
||||||
# Check device context for the battery sensor
|
# Check device context for the battery sensor
|
||||||
entity = entity_registry.async_get("sensor.aranet4_12345_battery")
|
entity = entity_registry.async_get("sensor.aranet4_12345_battery")
|
||||||
@ -296,10 +298,13 @@ async def test_sensors_aranetrn(
|
|||||||
assert interval_sensor_attrs[ATTR_UNIT_OF_MEASUREMENT] == "s"
|
assert interval_sensor_attrs[ATTR_UNIT_OF_MEASUREMENT] == "s"
|
||||||
assert interval_sensor_attrs[ATTR_STATE_CLASS] == "measurement"
|
assert interval_sensor_attrs[ATTR_STATE_CLASS] == "measurement"
|
||||||
|
|
||||||
status_sensor = hass.states.get("sensor.aranetrn_12345_threshold_level")
|
status_sensor = hass.states.get("sensor.aranetrn_12345_concentration_status")
|
||||||
status_sensor_attrs = status_sensor.attributes
|
status_sensor_attrs = status_sensor.attributes
|
||||||
assert status_sensor.state == "Normal"
|
assert status_sensor.state == "Normal"
|
||||||
assert status_sensor_attrs[ATTR_FRIENDLY_NAME] == "AranetRn+ 12345 Threshold Level"
|
assert (
|
||||||
|
status_sensor_attrs[ATTR_FRIENDLY_NAME]
|
||||||
|
== "AranetRn+ 12345 Concentration Status"
|
||||||
|
)
|
||||||
|
|
||||||
# Check device context for the battery sensor
|
# Check device context for the battery sensor
|
||||||
entity = entity_registry.async_get("sensor.aranetrn_12345_battery")
|
entity = entity_registry.async_get("sensor.aranetrn_12345_battery")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user