Martin Hjelmare
d0412d65ac
Remove stale tradfri devices ( #65218 )
2022-01-31 16:43:16 -08: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
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
Patrik Lindgren
e87fb6fc09
Add test cases for Tradfri sensor platform ( #64165 )
...
* Add tests for Tradfri sensor platform
* Update docstring
2022-01-15 15:53:03 +01: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
03defdc922
Add test cases for Tradfri cover platform ( #64072 )
...
* Add test cases for Tradfri cover
* Simplify test
* Fix typo
* Fix typos
* Update tests/components/tradfri/test_cover.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Fix
* Remove unused function
* Move common tools to separate file
* Simplify parametrization
* Use int
* Remove loop
* Use context manager
* Simplify
* Update docstring
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-01-14 19:40:14 +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
epenet
9f74ad06d6
Update ZeroconfServiceInfo in tests (t-z) ( #60221 )
...
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-23 11:28:50 -06: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
jan iversen
06d29040b9
Catch connection errors that makes tradfri hang in startup ( #59368 )
2021-11-09 13:00:50 +01: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
jan iversen
45983b5edf
Activate tradfri in coverage and clean conftest for tradfri ( #58058 )
2021-10-20 13:36:02 +02:00
jan iversen
8d7744a74f
Warn user if Gateway is already paired ( #57530 )
...
* Warn user if Gateway is already paired.
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-13 07:16:55 +02:00
jan iversen
2d669a4613
Remove legacy code. ( #54452 )
2021-08-11 11:07:04 +02:00
Ville Skyttä
153d6e891e
Use config_entries.SOURCE_* constants ( #49631 )
2021-04-25 11:27:40 +02:00
Erik Montnemery
b3fecb1c95
Update tests t-z to use async_get() instead of async_get_registry() ( #47655 )
2021-03-09 14:25:03 +01:00
Ville Skyttä
dc880118a4
Lint suppression cleanups ( #47248 )
...
* Unused pylint suppression cleanups
* Remove outdated pylint bug references
* Add flake8-noqa config and note to run it every now and then
* Add codes to noqa's
* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
Franck Nijhof
65cf2fcb6f
Drop asynctest ( #44746 )
2021-01-01 22:31:56 +01:00
Paulus Schoutsen
5dac3883b0
Stub light profiles ( #42232 )
2020-10-23 16:28:21 +02:00
Martin Hjelmare
36632f64f1
Mock tradfri lights correctly ( #39706 )
2020-09-06 11:54:08 +02:00
Martin Hjelmare
b6630a48b2
Add tradfri api call error handling ( #39681 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-09-05 23:02:32 +02:00
Martin Hjelmare
bde0bdbf80
Clean tradfri hass data and add tests ( #39620 )
2020-09-03 18:39:24 +02:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 ( #39287 )
2020-08-27 13:56:20 +02:00
Paulus Schoutsen
276f3afb00
Do async_setup_platform in background ( #36244 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-31 22:18:30 -07:00
Paulus Schoutsen
2af984917e
Use asynctest-mock in most places ( #35109 )
...
* Use asynctest-mock in most places
* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 ( #34901 )
2020-04-30 13:29:50 -07:00
Paulus Schoutsen
13c8c2e841
Add unique ID to TRADFRI ( #34745 )
2020-04-27 01:57:29 +02:00
Paulus Schoutsen
0d700f6a63
Fix tests for Python 3.8 ( #34672 )
2020-04-25 14:32:55 -07:00
Ziv
f2dad7905d
fixed uncaught exceptions for tradfri ( #33550 )
...
was caused by device_info being mocks, so write to storage failed
2020-04-03 00:55:04 +02:00
Jc2k
6b519499a7
Don't expose flows that aren't initialised. ( #30432 )
...
* Don't expose flows that aren't initialised.
If a flow init does not return immediately then there is a window where our
behaviour is screwy:
* Can try to configure a flow that isn't ready
* Can show notifications for discoveries that might yet return an abort
This moves the flow discovery events and notifications to after the flow is
initialised and hides flows that don't have a cur_step from async_progress
* Fix tradfri test
* Black.
* Lint fixes
2020-01-03 17:28:05 +01:00
Ville Skyttä
fa4fa30461
Various string cleanups ( #30435 )
...
* Remove some unnecessary string concatenations
* Replace some simple str.formats with f-strings
* Replace some string concatenations with f-strings
2020-01-03 14:47:06 +01:00
Ville Skyttä
e6388e186c
Remove unnecessary string literal concatenations ( #30360 )
2020-01-02 21:17:10 +02:00
Bas Nijholt
de915e1bf0
Sort imports according to PEP8 for components starting with "T" ( #29778 )
2019-12-09 14:41:48 +01:00
Paulus Schoutsen
1e5de9e9e4
Bump TRADFRI ( #26731 )
...
* Bump TRADFRI
* Fix test
2019-09-19 20:49:47 +02:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Paulus Schoutsen
26fc57d1b3
Ignore duplicate tradfri discovery ( #24759 )
...
* Ignore duplicate tradfri discovery
* Update name
2019-06-25 09:54:40 -07:00
Robert Svensson
3fef9a93cf
Trådfri component to use new zeroconf discovery ( #24041 )
...
* Move tradfri component to use new zeroconf discovery
* Will this work?
* Remove prints
* Correct order in generated zeroconf
* Update test_init.py
* Update test_init.py
* Update test_init.py
* Update test_init.py
2019-05-29 11:19:50 -07:00
Paulus Schoutsen
e9ea5c2ccb
Move tests to right folder ( #23790 )
...
* Move tests to right folder
* Fix test leaving files behind
2019-05-10 13:20:50 -07:00
Paulus Schoutsen
590eead128
Test fixes ( #22911 )
...
* Fix light tests [skip ci]
* Fix tests/common
* Fix some mqtt tests [skip ci]
* Fix tests and component manifests which have only one platform
* Fix more tests and manifests
* Fix demo/notify tests
* Rollback test for demo.geo_location
2019-04-08 23:16:55 -07:00
Martin Hjelmare
58af332d21
Allow tradfri groups for new imported entries ( #17310 )
...
* Clean up leftover config schema option
* Allow import groups via new config yaml setup
* Fix and add test
* Add a test without groups for legacy import
* Change default import groups to False
* Fix I/O in test
2018-10-11 10:37:34 +02:00
Paulus Schoutsen
273a7af330
Prevent discovered Tradfri while already configured ( #16891 )
...
* Prevent discovered Tradfri while already configured
* Lint
2018-09-26 18:03:25 +02:00
Paulus Schoutsen
2b2502c91c
Support old tradfri config format ( #16841 )
2018-09-25 11:57:32 +02:00
Paulus Schoutsen
a1c524d372
Config flow tradfri ( #16665 )
...
* Fix comments
* Add config flow tests
* Fix Tradfri light tests
* Lint
* Remove import group from config flow
* fix stale comments
2018-09-19 21:21:43 +02:00