Skip to content

Commit

Permalink
Merge pull request #77 from crowbarz/main
Browse files Browse the repository at this point in the history
(feat): Add entities for DysonAirQualitySelect
  • Loading branch information
Kakise authored Nov 26, 2021
2 parents 94ec838 + d6d88e5 commit 6c98772
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 6c98772

Please sign in to comment.