* Add debug logging to homekit when an sensor entity cannot be classified
In #132937 many hours were spent investigating an issue which
turned out to be that the entity did not have a device class
at startup because the group integration does not set the device
class if any of the underlying entities state is invalid.
closes#132937
* coverage
* Update tests/components/homekit/test_get_accessories.py
* Add support for air purifier type in HomeKit.
Any fan and PM2.5 in the same device will be treated as an air purifier.
type_air_purifiers.py heavily based on type_fans.py -
I tried extending type_fans.py but this looked better to me.
* Refactor to make AirPurifier class extend Fan.
* Ensure all chars are added before creating service
* Add support for switching automatic mode.
* Add test for auto/manual switch
* Add support for air purifier type in HomeKit.
Any fan and PM2.5 in the same device will be treated as an air purifier.
type_air_purifiers.py heavily based on type_fans.py -
I tried extending type_fans.py but this looked better to me.
* Add support for air purifier type in HomeKit.
Any fan and PM2.5 in the same device will be treated as an air purifier.
type_air_purifiers.py heavily based on type_fans.py -
I tried extending type_fans.py but this looked better to me.
* Refactor to make AirPurifier class extend Fan.
* Ensure all chars are added before creating service
* Add support for switching automatic mode.
* Add test for auto/manual switch
* Add support for air purifier type in HomeKit.
Any fan and PM2.5 in the same device will be treated as an air purifier.
type_air_purifiers.py heavily based on type_fans.py -
I tried extending type_fans.py but this looked better to me.
* Improve fan config: allow setting fan type (fan or air purifier)
Be more explicit than assuming a fan is an air purifier if it has a PM2.5 sensor. Set defaults based on the presence of sensors.
* Fix return type annotation for fan/air purifier create_services
* Allow linking air purifier filter level/change indicator
* Remove no longer needed if statement in fan init
* Fix up types and clean up code
* Update homekit tests to account for air purifiers
* Fix pylint errors
* Fix mypy errors
* Improve type annotations
* Improve readability of auto preset mode discovery
* Test air purifier with 'Auto' preset mode
* Handle case with a single preset mode
* Test air purifier edge cases: state updates to same value, and removed linked entities
* Don't create 'auto mode' switch for air purifiers
This is already exposed as a target mode on the air purifier service itself
* Handle unavailable states in air purifier
Also don't remove device class when updating state in test
* Reduce branching in air purifier test
* Split up air purifier tests for with and without auto presets, to reduce branching
* Handle unavailable states in air purifier more explicitly
* Use constant for ignored state values
* Use a set for ignored_states
* Update tests/components/homekit/test_type_air_purifiers.py
---------
Co-authored-by: Andrew Kurowski <62596884+ak6i@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick+github@koston.org>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Alarm state from enum
* Fixes
* Set final
* Fix rebase
* Test const
* Fix breaking version
* Fix other for alarm_control_panel
* Fix integrations
* More
* More
* More
* More
* Fix zha
* Replace _attr_state
* Fix alarm_control_panel
* Fix tests
* Fixes
* Mods
* Change some
* More
* More
* More
* Tests
* Last tests
* Return enum
* Fix zha
* Remove not needed check
* Fix wording
* Fix homekit
* Mod prometheus
* Fix mypy
* Fix homekit
* Fix ifttt
* Add types to event tracker data
* fixes
* do not test event internals in other tests
* fixes
* Update homeassistant/helpers/event.py
* cleanup
* cleanup
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>