Commit Graph
133 Commits
Author SHA1 Message Date
Jan ČermákandGitHub 4707108146 Samsung AC Wind Mode (#119750) 2024-06-21 13:19:42 +02:00
epenetandGitHub 3e9d25f81d Add missing argument type hints to component tests (#119671) 2024-06-14 09:26:46 +02:00
J. Nick KostonandGitHub dbd3147c9b Remove async_late_forward_entry_setups and instead implicitly hold the lock (#119088)
* Refactor config entry forwards to implictly obtain the lock instead of explictly

This is a bit of a tradeoff to not need async_late_forward_entry_setups

The downside is we can no longer detect non-awaited plastform setups
as we will always implicitly obtain the lock instead of explictly.

Note, this PR is incomplete and is only for discussion purposes
at this point

* preen

* cover

* cover

* restore check for non-awaited platform setup

* cleanup

* fix missing word

* make non-awaited test safer
2024-06-12 21:06:11 -04:00
epenetandGitHub fbaba3753b Fix root-import pylint warning in components (#119294)
* Fix root-import pylint warning in components

* Adjust

* Adjust
2024-06-10 15:14:49 +02:00
J. Nick KostonandGitHub ed0568c655 Ensure config entries are not unloaded while their platforms are setting up (#118767)
* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* run with error on to find them

* cert_exp, hold lock

* cert_exp, hold lock

* shelly async_late_forward_entry_setups

* compact

* compact

* found another

* patch up mobileapp

* patch up hue tests

* patch up smartthings

* fix mqtt

* fix esphome

* zwave_js

* mqtt

* rework

* fixes

* fix mocking

* fix mocking

* do not call async_forward_entry_setup directly

* docstrings

* docstrings

* docstrings

* add comments

* doc strings

* fixed all in core, turn off strict

* coverage

* coverage

* missing

* coverage
2024-06-04 21:34:39 -04:00
epenetandGitHub f39dd40be1 Add type hints for hass_storage in test fixtures (#118682) 2024-06-03 10:20:57 +02:00
epenetandGitHub e58d060f82 Use registry fixtures in tests (s) (#118295) 2024-05-28 15:41:03 +02:00
SidandGitHub 895f73d8e4 Enable Ruff A001 (#115654) 2024-04-21 23:25:27 +02:00
SidandGitHub 5f055a64bb Enable Ruff B017 (#115335) 2024-04-15 22:25:09 +02:00
SidandGitHub 3efee10b95 Enable Ruff RUF013 (#115333) 2024-04-10 08:55:59 +02:00
SidandGitHub f8b6629b26 Enable Ruff PGH rules (#115091) 2024-04-08 15:42:22 +02:00
Joost LekkerkerkerandGitHub ee66f6ec8c Use is in enum comparison in config flow tests P-T (#114675) 2024-04-02 11:21:50 -10:00
6bb4e7d62c Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <[email protected]>
Co-authored-by: Marc Mueller <[email protected]>
Co-authored-by: J. Nick Koston <[email protected]>
2024-03-26 00:02:16 +01:00
J. Nick KostonandGitHub 4f18f0d902 Fix setup timings when config entry platform loads are not awaited (#113959)
* 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
2024-03-23 15:26:38 -04:00
J. Nick KostonandGitHub a50883d975 Run service call tasks eagerly (#112791) 2024-03-08 20:37:21 -10:00
Marc MuellerandGitHub 32f3f46542 Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc MuellerandGitHub 7d6251ca08 Add empty line after module docstring [tests q-s] (#112711) 2024-03-08 14:47:22 +01:00
J. Nick KostonandGitHub c3d9192384 Migrate smartthings to use async_update_entry to alter config entries (#110403) 2024-02-12 21:24:45 +01:00
J. Nick KostonandGitHub 02efe41564 Avoid directly changing config entry state in tests (#110048) 2024-02-08 16:31:17 -06:00
G JohanssonandGitHub cac0d07549 Add TURN_ON/OFF ClimateEntityFeature for smartthings (#108979) 2024-01-30 17:56:52 +01:00
G JohanssonandGitHub bc720b48b4 Add TURN_OFF and TURN_ON to ClimateEntityFeature (#101673)
* Add ClimateEntityFeature.TURN_OFF

* Fixes

* Fixes

* wording

* Change to services

* Fixing

* Fixing

* Last bits

* Review comments

* Add hvac_modes checks

* Fixes

* Add tests

* Review comments

* Update snapshots

* balboa

* coolmaster

* ecobee

* mqtt

* nest

* plugwise

* smarttub

* whirlpool

* zwave_js

* fix test climate

* test climate

* zwave

* nexia

* nuheat

* venstar

* tado

* smartthings

* self.hvac_modes not None

* more tests

* homekit_controller

* homekit controller snapshot
2024-01-30 15:07:47 +01:00
8395d84bbb Add fan mode support to SmartThings fan entity (#106794)
* Fix the fan to support preset modes

* Add more tests and fix some comments

* Don't override inherited member

* Don't check for supported feature as the check is already performed before here

* Do not check for feature on properties

* Update homeassistant/components/smartthings/fan.py

Co-authored-by: G Johansson <[email protected]>

* Fix tests

---------

Co-authored-by: G Johansson <[email protected]>
2024-01-13 17:25:26 +01:00
41626ed500 Support for more features on smartthings AC (#99424)
* ability to set swing mode on samsung AC

* support for windFree mode on samsung AC

* Apply suggestions from code review

Co-authored-by: G Johansson <[email protected]>

* suggestion from code reviews

* Apply suggestions from code review

---------

Co-authored-by: G Johansson <[email protected]>
2023-11-22 20:00:28 +01:00
Ville SkyttäandGitHub b51c0f6ddc Remove unnnecessary pylint configs from components [s-z]* (#98925) 2023-08-24 01:25:32 +02:00
Paulus SchoutsenandGitHub ced4af1e22 Ignore smartthings storage on fresh install (#98418)
* Ignore smartthings storage on fresh install

* Also unload existing things when going for clean install

* Rename param

* Fix tests
2023-08-14 21:39:05 -05:00
Erik MontnemeryandGitHub fcdfeb74c8 Adjust smartthings tests which create devices (#98207) 2023-08-10 18:26:20 +02:00
Andrew SayreandGitHub 4ae69787a2 Fix SmartThings Cover Set Position (for window shades) (#96612)
* Update smartthings dependencies

* Update cover to support window_shade_level
2023-07-18 14:13:31 +02:00
Erik MontnemeryandGitHub 7539cf25be Don't require passing identifiers to DeviceRegistry.async_get_device (#96479)
* Require keyword arguments to DeviceRegistry.async_get_device

* Update tests

* Update tests

* Don't enforce keyword arguments
2023-07-13 13:39:25 -04:00
Guillaume DuveauandGitHub 23d5fb9622 Add more device info for SmartThings devices (#95723)
* Add more device info for SmartThings devices

* Fix binary_sensor test

* Fix binary sensor test, try 2

* Fix and add SmartsThings new device info tests
2023-07-06 14:26:46 -04:00
epenetandGitHub 24428d98a1 Fix lingering timer in smartthings tests (#91697) 2023-04-21 18:58:07 +02:00
epenetandGitHub 3a9adacdde Add type hints to integration tests (part 20) (#88179) 2023-02-15 15:23:34 +01:00
Franck NijhofandGitHub 9030ca05b1 Enable Ruff SIM118 (#87772) 2023-02-15 12:39:12 +01:00
Erik MontnemeryandGitHub cc564026fa Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
epenetandGitHub ba85fdcd61 Add type hints to integration tests (q-s) (#87706) 2023-02-08 08:12:54 -08:00
epenetandGitHub aa00114c2f Add return type to async tests without arguments (#87612) 2023-02-07 10:26:56 +01:00
Franck NijhofandGitHub ca1a12898c Enable Ruff D212 (#87347) 2023-02-03 23:08:48 +01:00
Franck NijhofandGitHub 5e81d28116 Update black to 23.1.0 (#87188) 2023-02-02 18:35:24 +01:00
epenetandGitHub 30bf0634fe Add per-file-ignore to pylint (#86289) 2023-01-22 17:26:24 +01:00
Franck NijhofandGitHub 79b52a2b41 Stricter pylint message control (#86154) 2023-01-20 13:47:55 +01:00
epenetandGitHub 0d696b84b2 Cleanup root component imports in tests (#78893) 2022-09-21 06:57:41 -10:00
epenetandGitHub 0ac581a0b1 Cleanup EntityFeature in tests (#78859) 2022-09-21 10:48:55 +02:00
Erik MontnemeryandGitHub 8936c91f50 Migrate smartthings light to color_mode (#70968) 2022-08-30 20:45:52 +02:00
Franck NijhofandGitHub 7cd68381f1 Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
mbo18andGitHub 9d73f9a2c5 Move power and energy attributes to sensors for SmartThings Air conditioner (#72594)
Move power and energy attribute to sensor for Air conditioner
2022-06-29 11:02:20 +02:00
epenetandGitHub 6bb685eaba Use LightEntityFeature enum in smartthings (#71057) 2022-04-29 22:42:45 +03:00
epenetandGitHub 98d757b2b2 Use climate enums in smartthings (#70737) 2022-04-26 09:12:54 +02:00
J. Nick KostonandGitHub 723dcbafca Complete fan speed transition from #59781 (#67743) 2022-03-09 10:38:12 +01:00
2c0033254b Import cloud (#64116)
* Add type hints to cloud

* Import cloud

* Adjust smartthings tests

Co-authored-by: epenet <[email protected]>
2022-01-14 16:35:35 +01:00
Franck NijhofandGitHub 3f7275a9c7 Give scenes last activated state (#62673) 2022-01-07 19:02:32 +01:00
Dave TandGitHub 79ef4dea98 Use new enums in smartthings tests (#62708)
* Use new enums in smartthings tests

* Convert == to is
2021-12-23 23:14:10 +01:00