Patrik Lindgren
af5d29735f
Deprecate SUPPORT_*-constants for Tradfri integration ( #69368 )
...
* Refactor constants
* Remove _LOGGER
* Fix sort order
* Refactor constats
* Run isort
* Remove SUPPORTED_ constants from Tradfri integration
* Remove constant
* Remove line
* Use brackets
* Add documentation
* Address review comments
2022-04-07 09:06:29 +02:00
Patrik Lindgren
04fc3a1f25
Cleanup constants in Tradfri integration ( #69125 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-04-05 14:00:45 +02:00
J. Nick Koston
723dcbafca
Complete fan speed transition from #59781 ( #67743 )
2022-03-09 10:38:12 +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
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
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
jan iversen
ad91e4b417
Simplify setup of tradfri entities ( #59343 )
...
* Simplify detection of devices.
2021-11-09 15:18:13 +01:00
jan iversen
55534cfedd
When tradfri device goes offline set attr_available false ( #58487 )
2021-10-27 18:27:16 +02:00
Patrik Lindgren
c950f1ccfa
Initial support for Tradfri STARKVIND Air purifier ( #58295 )
...
* Initial commit
* Update homeassistant/components/tradfri/const.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Feedback
* Updates
* Remove logger
* Fix codestring
* Update homeassistant/components/tradfri/fan.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/tradfri/fan.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/tradfri/fan.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Percent value
* Add tests
* Typo
* Update tests
* Fix util function
* Update homeassistant/components/tradfri/fan.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update after review
* Review
* Coverage
* Fix test
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-25 08:15:46 +02:00