Add support for Dyson Purecool 2018 Air Purifiers models TP04 and DP04 (#22215)
* initial commit initial commit rewrite tests fix merge issue with fan component fix merge issue with fan component * correct line length * change to sync_setup_component for tests * rename services and move services.yaml * move hepa and carbon filter state from sensor to fan * add test for duplicate entities * fix method call tests * fix docstring
This commit is contained in:
parent
1ce622469d
commit
e78709c5f5
15 changed files with 946 additions and 133 deletions
|
@ -37,9 +37,12 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
devices = []
|
||||
unit = hass.config.units.temperature_unit
|
||||
# Get Dyson Devices from parent component
|
||||
from libpurecoollink.dyson_pure_cool_link import DysonPureCoolLink
|
||||
for device in [d for d in hass.data[DYSON_DEVICES] if
|
||||
isinstance(d, DysonPureCoolLink)]:
|
||||
from libpurecool.dyson_pure_cool import DysonPureCool
|
||||
from libpurecool.dyson_pure_cool_link import DysonPureCoolLink
|
||||
|
||||
for device in [d for d in hass.data[DYSON_DEVICES]
|
||||
if isinstance(d, DysonPureCoolLink) and
|
||||
not isinstance(d, DysonPureCool)]:
|
||||
devices.append(DysonFilterLifeSensor(device))
|
||||
devices.append(DysonDustSensor(device))
|
||||
devices.append(DysonHumiditySensor(device))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue