Skip to content

Commit

Permalink
Ikea Starkvind support all models (#74615)
Browse files Browse the repository at this point in the history
* Add Particulate Matter 2.5 of ZCL concentration clusters to ZHA component

* Fixed black and flake8 test

* New sensors and manufacturer cluster to support IKEA STARKVIND (with quirk)

* Fix multi_match for FilterLifeTime, device_run_time, filter_run_time sensors for Ikea starkvind

* Remove model match because sensors are matched with manufacturer channel

* Update manufacturerspecific.py

* Update number.py
  • Loading branch information
arnemauer authored Jul 7, 2022
1 parent b9b6ed3 commit d8030ed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/zha/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class FrostLock(BinarySensor, id_suffix="frost_lock"):
_attr_device_class: BinarySensorDeviceClass = BinarySensorDeviceClass.LOCK


@MULTI_MATCH(channel_names="ikea_airpurifier", models={"STARKVIND Air purifier"})
@MULTI_MATCH(channel_names="ikea_airpurifier")
class ReplaceFilter(BinarySensor, id_suffix="replace_filter"):
"""ZHA BinarySensor."""

Expand Down
4 changes: 1 addition & 3 deletions homeassistant/components/zha/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,9 +525,7 @@ class TimerDurationMinutes(ZHANumberConfigurationEntity, id_suffix="timer_durati
_zcl_attribute: str = "timer_duration"


@CONFIG_DIAGNOSTIC_MATCH(
channel_names="ikea_airpurifier", models={"STARKVIND Air purifier"}
)
@CONFIG_DIAGNOSTIC_MATCH(channel_names="ikea_airpurifier")
class FilterLifeTime(ZHANumberConfigurationEntity, id_suffix="filter_life_time"):
"""Representation of a ZHA timer duration configuration entity."""

Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/zha/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ class TimeLeft(Sensor, id_suffix="time_left"):
_unit = TIME_MINUTES


@MULTI_MATCH(channel_names="ikea_airpurifier", models={"STARKVIND Air purifier"})
@MULTI_MATCH(channel_names="ikea_airpurifier")
class IkeaDeviceRunTime(Sensor, id_suffix="device_run_time"):
"""Sensor that displays device run time (in minutes)."""

Expand All @@ -823,7 +823,7 @@ class IkeaDeviceRunTime(Sensor, id_suffix="device_run_time"):
_unit = TIME_MINUTES


@MULTI_MATCH(channel_names="ikea_airpurifier", models={"STARKVIND Air purifier"})
@MULTI_MATCH(channel_names="ikea_airpurifier")
class IkeaFilterRunTime(Sensor, id_suffix="filter_run_time"):
"""Sensor that displays run time of the current filter (in minutes)."""

Expand Down

0 comments on commit d8030ed

Please sign in to comment.