Commit graph

764 commits

Author SHA1 Message Date
Maciej Bieniek
47c9d58b5e
Override the async_update() method for Shelly sleeping devices (#102516) 2023-10-25 13:48: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
Shay Levy
ca2f45d466
Fix Shelly typo in cover platform (#101292) 2023-10-02 22:30:58 +02:00
Maciej Bieniek
0fdf04391b
Use class attrs and shorthand attrs for Shelly (#101249) 2023-10-02 13:40:06 +02: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
Shay Levy
439ca60cb6
Fix Shelly Gen2 event get input name method (#100733) 2023-09-23 12:45:41 +03:00
Maciej Bieniek
c099ec19f2
Add missing translations for Shelly event type states (#100608)
Add missing translations for event type
2023-09-19 20:30:18 +02:00
Marc Mueller
37288d7788
Add pylint plugin to check for calls to base implementation (#100432) 2023-09-18 13:39:36 -05: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
Erik Montnemery
09ad1a9a36
Remove unnecessary block use of pylint disable in components p-z (#100192) 2023-09-12 20:47:48 +02:00
Jan Rieger
74a57e8676
Use more common translations (#100135) 2023-09-12 19:44:31 +02:00
Maciej Bieniek
e1f4a3fa9f
Add energy meter sensors for Shelly Pro EM (#99747)
* Add support for Pro EM

* Improve get_rpc_channel_name()

* Revert an unintended change

* Add tests
2023-09-07 06:59:04 +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
Shay Levy
b0f3b7bb76
Revert "Change naming of Shelly entities to correspond with HA guidelines" (#99059) 2023-08-28 10:42:24 +02:00
Shay Levy
406f06f0fc
Abort Shelly setup if MAC address mismatch (#98807) 2023-08-22 07:41:50 -05:00
Maciej Bieniek
17050a3286
Add support for Shelly Gas Valve addon (#98705)
* Support Gas Valve

* Treat opening and closing as open

* Use set_state()

* Change entity icon and name

* Add valve state sensor

* Closing == closed

* Add translations for valve state entity

* Valve state -> Valve status

* Add tests; use control_result

* Fix mypy error

* Add missing "valve" to the Mock

* Improve docstrings

* Fix climate platform tests

* Increase test coverage

* Add mising return
2023-08-22 11:53:52 +03: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
c526d23686
Change naming of Shelly entities to correspond with HA guidelines (#97533)
* Do not use the device name to create the entity name

* Remove unnecessary return

* Fix mypy complains

* Gen1

* Uncapitalize description.name if channel name is used

* Fix for climate and button

* switch_3 -> switch 3

* Add _attr_has_entity_name to ShellyRestAttributeEntity

* Capitalize channel name
2023-08-19 11:13:22 +02:00
Maciej Bieniek
d5338e88f2
Fix the availability condition for Shelly N current sensor (#98518) 2023-08-18 10:49:43 +02:00
Erik Montnemery
045c327928
Move DeviceInfo from entity to device registry (#98149)
* Move DeviceInfo from entity to device registry

* Update integrations
2023-08-10 22:04:26 -04:00
Maciej Bieniek
9910da2f3d
Add neutral current sensor for Shelly 3EM (#97981) 2023-08-08 16:47:18 +02:00
Maciej Bieniek
9f9602e8a7
Add frequency sensor for Shelly Plus/Pro xPM devices (#97172) 2023-07-24 23:07:57 +02:00
Maciej Bieniek
17e757af36
Add sensors for Shelly Plus PM Mini (#97163) 2023-07-24 19:53:39 +02:00
Franck Nijhof
30058297cf
Migrate backported StrEnum to built-in StrEnum (#97101) 2023-07-23 23:19:24 +02:00
Maciej Bieniek
c61c6474dd
Add frequency and N current sensors for Shelly Pro 3EM (#97082) 2023-07-23 21:33:47 +02:00
Maciej Bieniek
9f98a418cd
Add new sensors for Shelly Pro 3EM (#97006)
* Add new sensors

* Fix typo
2023-07-21 18:18:14 +03:00
Maciej Bieniek
2e156e56bf
Create an issue if Shelly TRV is not calibrated (#96952)
* Create issue if Shelly Valve is not calibrated

* Add test

* Improve test

* Improve issue description

* Restart -> reboot
2023-07-21 14:20:03 +02: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
Michael
36b4b5b887
Remove duplicated available property from Shelly coordinator entities (#96859)
remove duplicated available property
2023-07-18 22:18:41 +03:00
Marc Mueller
9e67bccb89
Replace EventType annotations with Event (#96426) 2023-07-18 08:51:06 +02:00
Maciej Bieniek
31dfa5561a
Add external power sensor for Shelly Plus HT (#96768)
* Add external power sensor for Plus HT

* Tests
2023-07-17 22:07:24 +03:00
Erik Montnemery
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
Paulus Schoutsen
7859be6481
Add deduplicate translations script (#96384)
* Add deduplicate script

* Fix forecast_solar incorrect key with space

* Fix utf-8

* Do not create references to other arbitrary other integrations

* Add commented code to only allow applying to referencing integrations

* Tweak

* Bug fix

* Add command line arg for limit reference

* never suggest to update common keys

* Output of script

* Apply suggestions from code review

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

---------

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2023-07-13 11:52:50 -04:00
Joost Lekkerkerker
2f6826dbe3
Use DeviceInfo object s-x (#96281)
* Use DeviceInfo object o-x

* Use DeviceInfo object
2023-07-11 13:40:15 -04:00
Maciej Bieniek
79a122e1e5
Fix Shelly button unique_id migration (#95707)
Fix button unique_id migration
2023-07-02 16:28:41 +03:00
Paulus Schoutsen
149ac4f99e
Capitalize a bunch of translations (#95421) 2023-06-28 11:08:53 +02:00
Maciej Bieniek
8d6a711cac
Make unique_id of the Shelly button entity immutable (#95160) 2023-06-27 19:10:12 +02:00
Franck Nijhof
3e85a29b86
Move overlapping pylint rules to ruff, disable mypy overlap (#94359) 2023-06-27 17:42:46 +02:00
Maciej Bieniek
05039036f1
Add compatibility with sleeping Shelly gen2 devices with firmware 1.0.0 (#94864) 2023-06-21 12:01:17 +02:00
Maciej Bieniek
15ddf69c6a
Bump Shelly backend library to version 5.4.0 (#94829)
Bump aioshelly to version 5.4.0
2023-06-19 00:10:29 +02:00
J. Nick Koston
2a5ffa9a5b
Fix timestamps for bluetooth scanners that bundle advertisements (#94511)
#94138 added support for raw/bundled advertisements. We should use the
same monotonic time for all advertisements in the bundle if not time
is passed, or calculate the timestamp and pass it if its known
2023-06-14 21:47:00 -04: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
Erik Montnemery
2406b235b4
Name unnamed binary sensors by their device class (#92940)
* Name unnamed binary sensors by their device class

* Update type annotations

* Fix loading of entity component translations

* Add test

* Update integrations

* Set abode and rfxtrx binary_sensor name to None

* Revert changes in homekit_controller
2023-06-13 19:48:54 +02:00
Maciej Bieniek
fe61672792
Don't inherit SensorEntity/NumberEntity and RestoreEntity in Shelly integration (#93531)
* Use RestoreNumber and Restore Sensor for block entities

* Update tests

* Use RestoreSensor for RPC entities

* Fix test for number platform
2023-06-04 19:14:08 -05:00
Maciej Bieniek
e6a214595b
Avoid KeyError when specifying the consumption type in Shelly integration (#93561)
Avoid KeyError when specifying the consumption type
2023-05-25 23:12:25 +02:00
Maciej Bieniek
eb058a3d41
Add illuminance sensor for Shelly gen2 devices (#93559) 2023-05-25 23:10:44 +02:00
Erik Montnemery
a71c097aeb
Revert "Allow setting an entity's name by its device class" (#93539) 2023-05-25 17:20:54 +02:00
epenet
6057aeee2f
Prevent NumberEntity and RestoreEntity inheritance (#93467) 2023-05-24 20:59:14 +02:00