Add UV sensor to SmartTub (#46888)

This commit is contained in:
Matt Zimmerman 2021-02-21 22:25:01 -08:00 committed by GitHub
parent 5c29adea3d
commit b2b476596b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -27,6 +27,7 @@ async def async_setup_entry(hass, entry, async_add_entities):
controller.coordinator, spa, "Flow Switch", "flow_switch"
),
SmartTubSensor(controller.coordinator, spa, "Ozone", "ozone"),
SmartTubSensor(controller.coordinator, spa, "UV", "uv"),
SmartTubSensor(
controller.coordinator, spa, "Blowout Cycle", "blowout_cycle"
),

View file

@ -27,6 +27,11 @@ async def test_sensors(spa, setup_entry, hass):
assert state is not None
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"
state = hass.states.get(entity_id)
assert state is not None