G Johansson
ca4c617d4b
Add TURN_OFF/TURN_ON feature flags for fan ( #121447 )
2024-07-19 11:35:24 +02:00
Marc Mueller
87165c0d6e
Add empty line after module docstring [tests t-z] ( #112712 )
2024-03-08 14:44:56 +01:00
Martin Hjelmare
6b4920ffa6
Refactor tradfri tests ( #110094 )
...
* Refactor tradfri tests
* Refactor command store
* Fix fixture type annotations
* Fix test type errors
2024-02-11 12:01:12 +01:00
Franck Nijhof
ed79265843
Enable Ruff PT006 ( #88165 )
...
* Enable Ruff PT006
* Adjust existing cases
* Fix tests
* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
Martin Hjelmare
ab2ab1573e
Refactor tradfri diagnostics tests ( #88017 )
2023-02-13 18:39:48 +01:00
Martin Hjelmare
8993a36e27
Refactor tradfri fan tests ( #87999 )
2023-02-13 15:40:21 +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
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
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
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