Skip to content

Commit

Permalink
Add entities for DysonAirQualitySelect
Browse files Browse the repository at this point in the history
  • Loading branch information
crowbarz committed Nov 25, 2021
1 parent 94ec838 commit d6d88e5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion custom_components/dyson_local/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

from typing import Callable

from libdyson import DysonPureHumidifyCool, HumidifyOscillationMode, WaterHardness
from libdyson import (
DysonPureHumidifyCool,
DysonPureHotCoolLink,
DysonPureCoolLink,
HumidifyOscillationMode,
WaterHardness,
)
from libdyson.const import AirQualityTarget

from homeassistant.components.select import SelectEntity
Expand Down Expand Up @@ -54,6 +60,10 @@ async def async_setup_entry(
device = hass.data[DOMAIN][DATA_DEVICES][config_entry.entry_id]
name = config_entry.data[CONF_NAME]
entities = []
if isinstance(device, DysonPureHotCoolLink) or isinstance(
device, DysonPureCoolLink
):
entities.append(DysonAirQualitySelect(device, name))
if isinstance(device, DysonPureHumidifyCool):
entities.extend(
[
Expand Down

0 comments on commit d6d88e5

Please sign in to comment.