Commit Graph

244 Commits (f89de613d9449f1edd717f00f333dd0546985fb4)

Author SHA1 Message Date
GitHub Action ad0cb4831e [ci skip] Translation update 2022-02-14 00:15:30 +00:00
Patrik Lindgren 543b49728a
Fix tradfri device name (#66219) 2022-02-10 08:19:59 +01:00
Patrik Lindgren f8a84f0101
Add diagnostics for Tradfri platform (#66092)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-02-08 22:05:33 +01:00
Patrik Lindgren afd0005a31
Add sensor for filter time left on Tradfri fan platform (#65877)
* Add support for filter time left

* Fix test for fan platform

* Remove debug code

* Add unique id migration tool

* Convert to hours

* Fix tests

* Apply suggestions from code review

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

* Add comment, check migration

* Refactor migration helper

* Refactor migration helper

* Move definition of new unique id

* Return after warning

* Add test for unique id migration

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-02-08 02:21:22 +01:00
GitHub Action 2da4d280b2 [ci skip] Translation update 2022-02-06 00:17:31 +00:00
Patrik Lindgren daedbbb1ee
Bump pytradfri to 9.0.0 (#65784)
* Bump pytradfri to 8.1.0

* Bump to 9.0.0

* Bump manifest
2022-02-05 13:25:50 +01:00
Martin Hjelmare 3697f5611c
Fix tradfri coordinator error handling (#65204) 2022-02-01 09:09:51 -08:00
Martin Hjelmare d0412d65ac
Remove stale tradfri devices (#65218) 2022-01-31 16:43:16 -08:00
GitHub Action ca7d4234e1 [ci skip] Translation update 2022-01-31 00:14:28 +00:00
Patrik Lindgren 473abb1793
Flag Tradfri groups and YAML as deprecated (#65226) 2022-01-30 22:16:51 +01:00
GitHub Action 77ef86faee [ci skip] Translation update 2022-01-30 00:14:21 +00:00
Patrik Lindgren 3ca1b2fc6e
Add air quality sensor for Tradfri air purifier (#65070)
* Add air quality sensor for Tradfri fan platform

* Refactor, use entity description

* Fix typo

* CHange init docstring

* Let lambda handle special case

* Remove unique id

* Apply suggestions from code review

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

* Refactor to constants, add mixin

* Rename lambda

* Update homeassistant/components/tradfri/sensor.py

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

* Update homeassistant/components/tradfri/sensor.py

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

* Update homeassistant/components/tradfri/sensor.py

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

* Replace lambda with function

* Refactor device init

* Remove fixture scope

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-01-29 23:55:05 +01:00
J. Nick Koston 5b755b74fb
Add loggers to integration manifest.json (#65083) 2022-01-28 13:37:53 -08:00
Patrik Lindgren 70321ed795
Add battery sensor for Tradfri blinds (#65067) 2022-01-27 17:47:47 +01:00
Patrik Lindgren 9d404b749a
Implement coordinator class for Tradfri integration (#64166)
* Initial commit coordinator

* More coordinator implementation

* More coordinator implementation

* Allow integration reload

* Move API calls to try/catch block

* Move back fixture

* Remove coordinator test file

* Ensure unchanged file

* Ensure unchanged conftest.py file

* Remove coordinator key check

* Apply suggestions from code review

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

* Import RequestError

* Move async_setup_platforms to end of setup_entry

* Remove centralised handling of device data and device controllers

* Remove platform_type argument

* Remove exception

* Remove the correct exception

* Refactor coordinator error handling

* Apply suggestions from code review

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

* Remove platform type from base class

* Remove timeout context manager

* Refactor exception callback

* Simplify starting device observation

* Update test

* Move observe start into update method

* Remove await self.coordinator.async_request_refresh()

* Refactor cover.py

* Uncomment const.py

* Add back extra_state_attributes

* Update homeassistant/components/tradfri/coordinator.py

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

* Refactor switch platform

* Expose switch state

* Refactor sensor platform

* Put back accidentally deleted code

* Add set_hub_available

* Apply suggestions from code review

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

* Fix tests for fan platform

* Update homeassistant/components/tradfri/base_class.py

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

* Update homeassistant/components/tradfri/base_class.py

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

* Fix non-working tests

* Refresh sensor state

* Remove commented line

* Add group coordinator

* Add groups during setup

* Refactor light platform

* Fix tests

* Move outside of try...except

* Remove error handler

* Remove unneeded methods

* Update sensor

* Update .coveragerc

* Move signal

* Add signals for groups

* Fix signal

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-01-27 11:12:52 +01:00
GitHub Action 47d3fb1dec [ci skip] Translation update 2022-01-23 00:13:53 +00:00
GitHub Action c6d481ca01 [ci skip] Translation update 2022-01-17 00:14:48 +00:00
Patrik Lindgren c2181aa5fc
Add test cases for Tradfri switch platform (#64156)
* Add tests for the switch platform

* Fix typo

* Typos
2022-01-15 12:27:42 +01:00
Patrik Lindgren 66f1ac025d
Add test cases for Tradfri fan platform (#64135)
* Add test cases for Tradfri fan platform

* Remove line
2022-01-15 11:34:19 +01:00
Patrik Lindgren b52a8ba37a
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>
2022-01-14 04:01:24 +01:00
GitHub Action d99548fc04 [ci skip] Translation update 2022-01-10 00:14:49 +00:00
Leah Oswald ec508130d2
Add default mode 'auto' for tradfri starkvind air purifier on turn on (#63641)
* add default mode 'auto' for tradfri starkvind air purifier on turn on

This commits fixes the behaviour described in #60122 (purifier couldn't be
started via toggle switch). It adds 'auto' as default mode/fallback for
turning on the starkvind air purifier. This is now the same behaviour the
original app provides.

* Refactor code that set 'auto' as default value for tradfri starkvind on
turn on
2022-01-08 21:01:54 +01:00
Marc Mueller ae6d9c229e
Use const imports [l-z] (#63469) 2022-01-05 18:21:20 +01:00
Marc Mueller b0f72f59da
Use imports from `core` (#63458) 2022-01-05 14:55:38 +01:00
GitHub Action 8c8c7e91a2 [ci skip] Translation update 2021-12-25 00:13:29 +00:00
GitHub Action babd753610 [ci skip] Translation update 2021-12-21 00:15:06 +00:00
Robert Hillis 357d91fb0e
Use enums in tradfri (#62025) 2021-12-16 13:07:33 +01:00
GitHub Action eb345bfdf1 [ci skip] Translation update 2021-12-14 00:13:33 +00:00
GitHub Action f75b325ab2 [ci skip] Translation update 2021-12-12 00:14:30 +00:00
GitHub Action ecdb18eb0a [ci skip] Translation update 2021-12-06 00:13:37 +00:00
Marc Mueller b79b35abb5
Use platform enum (7) [T-Z] (#60948)
Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-12-04 14:10:01 +01:00
GitHub Action 68ca0a05c8 [ci skip] Translation update 2021-12-04 00:13:16 +00:00
Martin Hjelmare deae8dd07b
Bump pytradfri to 7.2.1 (#60910) 2021-12-03 15:30:09 +01:00
GitHub Action c9589f763c [ci skip] Translation update 2021-12-01 00:17:12 +00:00
epenet ae9320b616
Use dataclass properties in tradfri discovery (#60592)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-30 11:05:42 +01:00
GitHub Action 96313bbbe0 [ci skip] Translation update 2021-11-27 00:12:17 +00:00
GitHub Action 78b47019f9 [ci skip] Translation update 2021-11-26 00:12:49 +00:00
GitHub Action d3c020325b [ci skip] Translation update 2021-11-25 00:13:33 +00:00
GitHub Action 9e606abb0c [ci skip] Translation update 2021-11-23 00:13:54 +00:00
jan iversen 5608b4fb18
Update CODEOWNERS for tradfri (#60023)
Co-authored-by: rianadon <ryanadolf123@gmail.com>
2021-11-22 13:43:04 +01:00
epenet 70f43a1415
Use ZeroconfServiceInfo in tradfri (#60112)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-22 11:49:37 +01:00
GitHub Action 29dc9de08f [ci skip] Translation update 2021-11-19 00:14:01 +00:00
epenet 4d96ca3ddb
Adjust async_step_homekit signature for strict typing (#59745)
* Use ZeroconfServiceInfo in async_step_homekit

* Update DiscoveryFlowHandler

* Update components
2021-11-15 17:27:04 -06:00
GitHub Action 86b12af3dc [ci skip] Translation update 2021-11-10 00:17:39 +00:00
jan iversen ad91e4b417
Simplify setup of tradfri entities (#59343)
* Simplify detection of devices.
2021-11-09 15:18:13 +01:00
jan iversen 06d29040b9
Catch connection errors that makes tradfri hang in startup (#59368) 2021-11-09 13:00:50 +01:00
jan iversen ac354ecff5
Bump pytradfri to v7.2.0. (#59342) 2021-11-08 20:20:19 +01:00
jan iversen 2b68b9292c
Set tradfri entities to non-available when hub is not available (#59278)
* Set available when needed.

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-11-08 18:41:25 +01:00
GitHub Action e35b83081e [ci skip] Translation update 2021-11-08 00:12:31 +00:00
jan iversen 933ad5ae49
Fix tradfri group reachable access (#59217) 2021-11-06 16:46:51 +01:00