Add UV sensor to SmartTub (#46888)
This commit is contained in:
parent
5c29adea3d
commit
b2b476596b
2 changed files with 6 additions and 0 deletions
|
@ -27,6 +27,7 @@ async def async_setup_entry(hass, entry, async_add_entities):
|
||||||
controller.coordinator, spa, "Flow Switch", "flow_switch"
|
controller.coordinator, spa, "Flow Switch", "flow_switch"
|
||||||
),
|
),
|
||||||
SmartTubSensor(controller.coordinator, spa, "Ozone", "ozone"),
|
SmartTubSensor(controller.coordinator, spa, "Ozone", "ozone"),
|
||||||
|
SmartTubSensor(controller.coordinator, spa, "UV", "uv"),
|
||||||
SmartTubSensor(
|
SmartTubSensor(
|
||||||
controller.coordinator, spa, "Blowout Cycle", "blowout_cycle"
|
controller.coordinator, spa, "Blowout Cycle", "blowout_cycle"
|
||||||
),
|
),
|
||||||
|
|
|
@ -27,6 +27,11 @@ async def test_sensors(spa, setup_entry, hass):
|
||||||
assert state is not None
|
assert state is not None
|
||||||
assert state.state == "off"
|
assert state.state == "off"
|
||||||
|
|
||||||
|
entity_id = f"sensor.{spa.brand}_{spa.model}_uv"
|
||||||
|
state = hass.states.get(entity_id)
|
||||||
|
assert state is not None
|
||||||
|
assert state.state == "off"
|
||||||
|
|
||||||
entity_id = f"sensor.{spa.brand}_{spa.model}_blowout_cycle"
|
entity_id = f"sensor.{spa.brand}_{spa.model}_blowout_cycle"
|
||||||
state = hass.states.get(entity_id)
|
state = hass.states.get(entity_id)
|
||||||
assert state is not None
|
assert state is not None
|
||||||
|
|
Loading…
Add table
Reference in a new issue