1
0
mirror of https://github.com/home-assistant/core.git synced 2025-09-05 11:16:21 +00:00
Commit Graph

62 Commits

Author SHA1 Message Date
epenet
e7ce01e649 Enforce namespace import in components () 2024-05-27 12:50:11 +02:00
Marc Mueller
eedce95bc9 Use PEP 695 for class annotations (2) () 2024-05-20 10:43:59 +02:00
Shay Levy
d84890bc59 Bump aioshelly to 10.0.0 () 2024-05-19 19:25:12 +02:00
Shay Levy
bfc52b9fab Avoid Shelly RPC reconnect during device shutdown () 2024-05-19 02:05:51 +03:00
Marc Mueller
44049c34f9 Use PEP 695 type alias for ConfigEntry types () 2024-05-17 15:42:58 +02:00
Sid
ac54cdcdb4 Enable Ruff RUF010 ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-08 23:54:49 +02:00
Michael
8238cd9f22 Store runtime data inside the config entry in Shelly () 2024-05-04 12:41:25 +02:00
Shay Levy
d1f88ffd1e Prevent Shelly raising in a task ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-04-29 08:03:57 -05:00
J. Nick Koston
9ca1d204b6 Fix shelly delaying shutdown () 2024-04-28 11:19:38 -05:00
Shay Levy
291df6dafe Bump aioshelly to 9.0.0 ()
* Update Shelly to use initialize from aioshelly

* Save indentation in _async_device_connect

* Use firmware_supported property from aioshelly

* Review comments

* Bump aioshelly

* Fix lint errors

* Test RPC initialized update
2024-04-14 18:07:26 +03:00
J. Nick Koston
ca5ed274cb Deprecate calling async_listen and async_listen_once with run_immediately () 2024-04-08 10:07:54 -10:00
Shay Levy
121182167f Fix Shelly reauth flow ()
* Fix Shelly reauth flow

* Rename shutdown_device to async_shutdown_device
2024-03-25 23:27:44 +02:00
Simone Chemelli
8728057b1b Add support for Shelly RPC devices custom TCP port ()
* First coding

* add port to config_entry + gen1 not supported msg

* fix async_step_credentials

* strings

* fix reauth

* fix visit device link

* increased MINOR_VERSION

* apply review comments

* align to latest aioshelly

* missing tests

* introduce port parameter

* update tests

* remove leftover

* remove "port" data_description key

* missing key

* apply review comments

* apply more review comments

* Add tests

* apply review comment

* apply review comment (part 2)

* description update

* fine tuning description

* fix test patching

---------

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2024-03-21 19:58:56 +01:00
J. Nick Koston
796f4deac2 Run shelly coordinator shutdown immediately at the stop event ()
There is no need to use a call_soon here as we want to shutdown
right away
2024-03-16 19:36:02 -04:00
Shay Levy
d17e397455 Ignore Shelly block update with cfgChanged None () 2024-03-16 16:18:41 +02:00
Marc Mueller
930a396712 Add empty line after module docstring [s] () 2024-03-08 14:33:51 +01:00
J. Nick Koston
6c00d02d0b Use eager_start for shelly task creation () 2024-02-27 11:55:38 -10:00
J. Nick Koston
ae7ebc25c7 Migrate shelly to use Debouncer.async_schedule_call () 2024-02-21 09:47:36 -06:00
Simone Chemelli
7359449636 Code quality for Shelly integration () 2024-01-30 09:47:52 +01:00
Shay Levy
ad3c78f848 Fix Shelly missing Gen value for older devices () 2024-01-05 13:32:04 -10:00
Maciej Bieniek
afcf8c9718 Get Shelly RPC device gen from config entry data ()
Use gen from config entry data
2024-01-03 19:45:59 -05:00
Maciej Bieniek
35b733fa2c Bump aioshelly to version 7.0.0 ()
* Remove get_rpc_device_sleep_period() function

* Bump aioshelly version to 7.0.0

* Remove firmware compatibility check from BLE scanner

* Remove firmware compatibility check from light transition

* Update default fw ver

* Use LightEntityFeature in tests
2023-12-09 17:12:05 +02:00
Simone Chemelli
e161bb9e41 fix BLE stop error for disconnected Shelly devices () 2023-11-24 20:56:15 +02:00
Maciej Bieniek
2515dbeee1 Bump aioshelly to version 6.1.0 ()
* Bump aioshelly

* Use MODEL_* consts from aioshelly

* Add missing models to BATTERY_DEVICES_WITH_PERMANENT_CONNECTION
2023-11-24 20:55:00 +02:00
Maciej Bieniek
3aa6771835 Update DeviceInfo.sw_version value for Shelly Gen2 sleeping devices ()
* Update device info for gen2 sleeping devices

* Add test

* Update sw_version only if the firmware_version value has changed

* Rename device_update_info() to update_device_fw_info()

* Remove duplicate comparison
2023-10-04 11:00:17 +02:00
Shay Levy
956098ae3a Shelly - remove unused device update info call () 2023-10-03 19:21:31 +03:00
Maciej Bieniek
5c5dff034c Add event platform for Shelly gen1 devices ()
* Initial commit

* Use description.key

* Add translations

* Check event_types

* Rename input_id to channel

* Fix removeal confition

* Add tests

* Sort classes and consts

* Use ShellyBlockEntity class

* Update tests

* Update homeassistant/components/shelly/event.py

Co-authored-by: Shay Levy <levyshay1@gmail.com>

---------

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2023-09-23 16:03:57 +02:00
Maciej Bieniek
f6243a1f79 Add event platform for Shelly gen2 devices ()
* Add event platform for gen2 devices

* Add tests

* Add removal condition

* Simplify RpcEventDescription; fix availability

* Improve names and docstrings

* Improve the event entity name

* Use async_on_remove()

* Improve tests coverage

* Improve tests coverage

* Prefix the entity name with the device name in the old way

* Black

* Use DeviceInfo object
2023-09-18 00:38:08 +02:00
Maciej Bieniek
d9a1ebafdd Show OTA update progress for Shelly gen2 devices ()
* Show OTA update progress

* Use an event listener instead of a dispatcher

* Add tests

* Fix name

* Improve tests coverage

* Fix subscribe/unsubscribe logic

* Use async_on_remove()
2023-09-06 08:17:45 +02:00
Maciej Bieniek
f97f33fff7 Only create an issue if push updates fail 5 times in a row for Shelly gen1 devices () 2023-08-21 22:27:36 +02:00
Shay Levy
a713d7585f Bump aioshelly to 6.0.0 () 2023-08-21 10:49:11 +03:00
Maciej Bieniek
db83dc9acc Create an issue if push updates fail for Shelly gen1 devices ()
* Create an issue if push updates fail

* Improve strings

* Delete the issue when reloading configuration entry

* Change MAX_PUSH_UPDATE_FAILURES to 5

* Improve issue strings

* Add test

* Use for

* Update homeassistant/components/shelly/strings.json

Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>

* Simplify deleting the issue

---------

Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>
2023-07-20 13:11:05 +02:00
Maciej Bieniek
7b3f100efb Catch InvalidAuthError in shutdown() method for Shelly gen2 devices ()
* Catch InvalidAuthError in shutdown() method

* Add test

* Revert unwanted change in tests
2023-06-15 00:00:21 +03:00
epenet
1cca6f7c9e Fix lingering timer in shelly () 2023-05-04 10:34:15 +02:00
Maciej Bieniek
5244f5731e Do not reload Shelly TRV config entry () 2023-04-25 22:20:59 +02:00
Maciej Bieniek
95bb019f71 Do not reload Shelly TRV entry when not needed ()
* Do not reload the entry when the target temperature changes

* Do not reload the entry when the mode changes

* Increase test coverage

* Increase test coverage
2023-02-15 10:21:53 +01:00
Shay Levy
ae6bc96002 Shelly code quality () 2023-01-27 10:47:05 +02:00
Shay Levy
0d3bf0e911 Fix Shelly sleeping Gen2 - update data upon initialize () 2023-01-24 18:38:27 +02:00
Shay Levy
d5797d9f7d Cleanup Shelly imports ()
* Cleanup Shelly imports

* Cleanup tests
2023-01-22 01:26:54 +02:00
Shay Levy
df77646c8a Fix Shelly sleeping Gen2 - do not refresh from zeroconf discovery () 2023-01-20 21:27:31 +02:00
Shay Levy
585c4acfee Shelly - use common coordinator base class ()
* Shelly - use common coordinator base class

* rename entry to device_entry

Co-authored-by: J. Nick Koston <nick@koston.org>

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-20 09:43:01 +02:00
Shay Levy
0dabbcfca1 Fix Shelly sleeping Gen2 device updates () 2023-01-19 01:11:40 +02:00
J. Nick Koston
2c95c0b3a1 Do not check ble scanner state for sleepy shelly devices ()
fixes 
2023-01-10 00:16:14 +02:00
Marc Mueller
11b5de9463 Improve shelly generic typing ()
Improve shelly generic typing
2022-12-31 08:33:41 +02:00
Marc Mueller
694fa3d014 Improve DataUpdateCoordinator typing in integrations (4) () 2022-12-27 22:50:57 +01:00
J. Nick Koston
b7c7e7f57b Try to reconnect disconnected shelly devices as soon as they discovered by zeroconf () 2022-12-13 14:22:34 -10:00
J. Nick Koston
d91e44485c Do not try to reconnect shelly on disconnected if Home Assistant is stopping () 2022-12-11 21:33:58 -10:00
J. Nick Koston
af1c326cff Try to reconnect right away when disconnected from Shelly Gen2 devices () 2022-12-10 06:15:10 -10:00
J. Nick Koston
b665a060f7 Do not try to stop the shelly ble scanner if not connected ()
Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-12-06 22:57:54 -05:00
Shay Levy
1e68e8c4b4 Add Shelly tests coverage ()
* Add Shelly tests coverage

* Review comments

* Remove leftovers
2022-11-24 20:07:19 +02:00