Commit graph

43 commits

Author SHA1 Message Date
Shay Levy
0dbb4105bc
Fix Shelly missing Gen value for older devices (#107294) 2024-01-06 12:24:29 +01:00
Maciej Bieniek
8c9875c3cc
Get Shelly RPC device gen from config entry data (#107019)
Use gen from config entry data
2024-01-05 13:00:07 +01:00
Maciej Bieniek
35b733fa2c
Bump aioshelly to version 7.0.0 (#105384)
* 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 (#104457) 2023-11-24 20:56:15 +02:00
Maciej Bieniek
2515dbeee1
Bump aioshelly to version 6.1.0 (#104456)
* 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 (#101338)
* 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 (#101295) 2023-10-03 19:21:31 +03:00
Maciej Bieniek
5c5dff034c
Add event platform for Shelly gen1 devices (#100655)
* 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 (#99659)
* 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 (#99534)
* 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 (#98747) 2023-08-21 22:27:36 +02:00
Shay Levy
a713d7585f
Bump aioshelly to 6.0.0 (#98719) 2023-08-21 10:49:11 +03:00
Maciej Bieniek
db83dc9acc
Create an issue if push updates fail for Shelly gen1 devices (#96910)
* 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 (#94563)
* 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 (#92466) 2023-05-04 10:34:15 +02:00
Maciej Bieniek
5244f5731e
Do not reload Shelly TRV config entry (#92000) 2023-04-25 22:20:59 +02:00
Maciej Bieniek
95bb019f71
Do not reload Shelly TRV entry when not needed (#88037)
* 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 (#86733) 2023-01-27 10:47:05 +02:00
Shay Levy
0d3bf0e911
Fix Shelly sleeping Gen2 - update data upon initialize (#86544) 2023-01-24 18:38:27 +02:00
Shay Levy
d5797d9f7d
Cleanup Shelly imports (#86359)
* 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 (#86296) 2023-01-20 21:27:31 +02:00
Shay Levy
585c4acfee
Shelly - use common coordinator base class (#86262)
* 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 (#86198) 2023-01-19 01:11:40 +02:00
J. Nick Koston
2c95c0b3a1
Do not check ble scanner state for sleepy shelly devices (#85566)
fixes #85563
2023-01-10 00:16:14 +02:00
Marc Mueller
11b5de9463
Improve shelly generic typing (#84889)
Improve shelly generic typing
2022-12-31 08:33:41 +02:00
Marc Mueller
694fa3d014
Improve DataUpdateCoordinator typing in integrations (4) (#84658) 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 (#83872) 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 (#83805) 2022-12-11 21:33:58 -10:00
J. Nick Koston
af1c326cff
Try to reconnect right away when disconnected from Shelly Gen2 devices (#83701) 2022-12-10 06:15:10 -10:00
J. Nick Koston
b665a060f7
Do not try to stop the shelly ble scanner if not connected (#83424)
Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-12-06 22:57:54 -05:00
Shay Levy
1e68e8c4b4
Add Shelly tests coverage (#82642)
* Add Shelly tests coverage

* Review comments

* Remove leftovers
2022-11-24 20:07:19 +02:00
J. Nick Koston
ae7272575a
Enable shelly BLE when the scanner is enabled if it is disabled (#82153)
Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-11-15 15:37:45 -06:00
J. Nick Koston
7614aba401
Stop shelly BLE scanner on unload (#82151)
* Stop shelly BLE scanner on unload

needs https://github.com/home-assistant-libs/aioshelly/pull/285

* bump
2022-11-15 23:22:33 +02:00
J. Nick Koston
435fc23737
Add shelly ble scanner support (#82007) 2022-11-15 12:34:45 -06:00
J. Nick Koston
956120662e
Add the ability to register for shelly event callbacks (#82052) 2022-11-14 19:58:10 +01:00
Shay Levy
5cf4483df5
Fix Shelly Plus H&T sleep period on external power state change (#81121) 2022-10-28 19:48:27 +03:00
Shay Levy
dce4753510
Cleanup Shelly update platform (#80845) 2022-10-25 00:20:26 +03:00
Shay Levy
8fa64a7a89
Bump aioshelly to 4.1.0 (#80795) 2022-10-22 22:57:25 -06:00
Shay Levy
aea7a9af18
Bump aioshelly to 4.0.0 (#80423)
* Bump aioshelly to 4.0.0

* Remove leftover

* Fix number platform

* Set last_update_success to false upon failure in number and climate

* Set last_update_success upon failurie in entity
2022-10-20 15:08:48 +03:00
Shay Levy
8e9457d808
Add Shelly support for sleeping Gen2 devices (#79889) 2022-10-18 22:42:22 +03:00
Shay Levy
93b2a6cc26
Refactor Shelly to use data class for ConfigEntry data (#79671)
* Refactor Shelly to use data class for ConfigEntry data

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/shelly/__init__.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Optimize usage of shelly_entry_data in _async_setup_block_entry

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2022-10-06 10:10:58 +03:00
Shay Levy
22c68b95bf
Refactor Shelly wrapper to coordinator (#79628) 2022-10-05 14:39:58 +02:00
Shay Levy
8faecae34d
Shelly - move coordinators to coordinator.py (#79616) 2022-10-04 22:29:07 +03:00