Bump pytradfri to 8.0.1 and fix fan preset mode "Auto" bug (#63920)

* Move util functions

* Fix errors

* Revert changes

* Fix tests

* Use self.async_set_percentage()

* Fix calculation functions and associated tests

* Handle case of 0

* Update tests/components/tradfri/test_util.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/tradfri/test_util.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/tradfri/test_util.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Handle case of 0

* Update homeassistant/components/tradfri/fan.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Patrik Lindgren 2022-01-14 04:01:24 +01:00 committed by GitHub
parent a978661545
commit b52a8ba37a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 62 additions and 50 deletions

View file

@ -36,3 +36,4 @@ PLATFORMS = [
Platform.SWITCH,
]
TIMEOUT_API = 30
ATTR_MAX_FAN_STEPS = 49