mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 14:27:07 +00:00
Correct Chlorine unit definition in flipr integration (#147537)
* Correction of bug 145683 * constant for chlorine unit correction * constant name correction * Review correction
This commit is contained in:
parent
43450d4489
commit
bbd1cbf5c9
@ -19,7 +19,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||
SensorEntityDescription(
|
||||
key="chlorine",
|
||||
translation_key="chlorine",
|
||||
native_unit_of_measurement=UnitOfElectricPotential.MILLIVOLT,
|
||||
native_unit_of_measurement="mg/L",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
|
@ -54,7 +54,7 @@ async def test_sensors(
|
||||
|
||||
state = hass.states.get("sensor.flipr_myfliprid_chlorine")
|
||||
assert state
|
||||
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == "mV"
|
||||
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == "mg/L"
|
||||
assert state.attributes.get(ATTR_STATE_CLASS) is SensorStateClass.MEASUREMENT
|
||||
assert state.state == "0.23654886"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user