* Use external temp for current temp depends on the sensor state
* Add SensorMode enum
* Add tests for Broadlink climate
* Check is the sensor included in the data
* Use IntEnum as parent of SensorMode
* Use SensorMode enum value for sensor test data
* Parametrizing tests
* Readd accidentally removed assert
* Use local sensor variable
Co-authored-by: Robert Resch <robert@resch.dev>
* Refactor test_climate. Check call_counts.
* Add parameter types
Co-authored-by: Robert Resch <robert@resch.dev>
* Update homeassistant/components/broadlink/climate.py
---------
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Write data to ha after entity added
* Properly mock api return values
Some values like _attr_is_on were mapped to MagicMocks which led to them evaluating to True. Actually calling the update state method when adding the entities made that improper mocking come to the surface.
* Call _update_state instead of _recv_data
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Move setup time logging into the context manager
We were fetching the time twice but since the context
manager already has the timing, move it there
* remove log setup assertions from integration test
* tweak logging to give us better data for tracking issues
* redundant
* adjust
* preen
* fixes
* adjust
* make api change internal so nobody uses it
* coverage
* fix test
* fix more tests
* coverage
* more tests assuming internal calls
* fix more
* adjust
* adjust
* fix axis tests
* fix broadlink -- it does not call async_forward_entry_setup
* missed some
* remove useless patch
* rename, detect it both ways
* clear
* debug
* try to fix
* handle phase finishing out while paused
* where its set does not need to know its late as that is an implemenation detail of setup
* where its set does not need to know its late as that is an implemenation detail of setup
* tweak
* simplify
* reduce complexity
* revert order change as it makes review harder
* revert naming changes as it makes review harder
* improve comment
* improve debug
* late dispatch test
* test the other way as well
* Update setup.py
* Update setup.py
* Update setup.py
* simplify
* reduce
* Phase out periodic tasks
* false by default or some tests will block forever, will need to fix each one manually
* kwarg works
* kwarg works
* kwarg works
* fixes
* fix more tests
* fix more tests
* fix lifx
* opensky
* pvpc_hourly_pricing
* adjust more
* adjust more
* smarttub
* adjust more
* adjust more
* adjust more
* adjust more
* adjust
* no eager executor
* zha
* qnap_qsw
* fix more
* fix fix
* docs
* its a wrapper now
* add more coverage
* coverage
* cover all combos
* more fixes
* more fixes
* more fixes
* remaining issues are legit bugs in tests
* make tplink test more predictable
* more fixes
* feedreader
* grind out some more
* make test race safe
* one more
* Fix formatting of mac addresses from dhcp discovery mocking in broadlink
dhcp returns addresses in lowercase without :
* fix missed ones
* broadlink has same format
* Migrate Broadlink to new entity naming style
Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
* Add some tests
Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
* Convert persistent notification tests to async
* Create/dismiss persistent notifications in exposed functions, not service calls
* Fix notify persistent_notification
* Remove setting up persistent_notification
* Drop more setups
* Empty methods
* Undeprecate sync methods because too big task
* Fix setup clearing notifications
* Fix a bunch of tests
* Fix more tests
* Uno mas
* Test persistent notification events
* Clean up stale comment
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Change config entry state to an enum
* Allow but deprecate EntryState str equality comparison
* Test fixes
* Rename to ConfigEntryState
* Remove str comparability backcompat
* Update new occurrences of strs cropped up during review
* Implement heartbeat in the Broadlink integration
* Rename INTERVAL to HEARTBEAT_INTERVAL
* Test that we log an error message when the heartbeat fails
* Make async_get_device connections Optional, default None
* Remove unnecessary async_get_device connections arg usages
Some of these were using an incorrect collection type, which didn't
cause issues mostly just due to luck.