Commit graph

77 commits

Author SHA1 Message Date
Erik Montnemery
0c2485bc03
Freeze integration entity descriptions (#105984)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-18 16:28:13 -10:00
Maciej Bieniek
47c9d58b5e
Override the async_update() method for Shelly sleeping devices (#102516) 2023-10-25 13:48:00 +02:00
Maciej Bieniek
0fdf04391b
Use class attrs and shorthand attrs for Shelly (#101249) 2023-10-02 13:40:06 +02:00
Marc Mueller
37288d7788
Add pylint plugin to check for calls to base implementation (#100432) 2023-09-18 13:39:36 -05:00
Erik Montnemery
09ad1a9a36
Remove unnecessary block use of pylint disable in components p-z (#100192) 2023-09-12 20:47:48 +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
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
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
Michael
36b4b5b887
Remove duplicated available property from Shelly coordinator entities (#96859)
remove duplicated available property
2023-07-18 22:18:41 +03:00
Franck Nijhof
3e85a29b86
Move overlapping pylint rules to ruff, disable mypy overlap (#94359) 2023-06-27 17:42:46 +02: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
Franck Nijhof
fcb612cd6f
Collection of code styling tweaks (#87344) 2023-02-03 23:51:27 +01:00
Shay Levy
803cd8d9a3
Handle state unknown if last state is missing in Shelly (#86813)
Shelly - handle state unknown if last state is missing
2023-01-27 23:34:56 +01:00
Shay Levy
d5797d9f7d
Cleanup Shelly imports (#86359)
* Cleanup Shelly imports

* Cleanup tests
2023-01-22 01:26:54 +02:00
Franck Nijhof
f39f3b612a
String formatting and max line length - Part 5 (#84501)
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2022-12-23 16:43:17 +01:00
Shay Levy
111a38589e
Shelly code quality - use properties for status (#83421) 2022-12-07 00:00:45 +02:00
Shay Levy
32f3eb722e
Add tests coverage for Shelly entity (#82432)
* Add tests coverage for Shelly entity

* Make it generator expression
2022-11-20 23:59:25 +02:00
Maciej Bieniek
df7000f96d
Always use Celsius in Shelly integration, part 2 (#81602)
* Always use Celsius in Shelly integration

* Update homeassistant/components/shelly/sensor.py

Co-authored-by: Aarni Koskela <akx@iki.fi>

* Restore unit from the registry during HA startup

Co-authored-by: Aarni Koskela <akx@iki.fi>
2022-11-06 20:23:48 +00: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
Simone Chemelli
0738f08215
Add missing sensors for Shelly Plus H&T (#76001)
* Add missing sensors for Shelly Plus H&T

* Cleanup

* Fix

* Add voltage to battery sensor

* Apply review comments
2022-08-01 09:52:51 +02:00
Shay Levy
0d94324d58
Clean up Shelly async methods that are not awaiting (#72026) 2022-05-17 10:57:41 -07:00
Franck Nijhof
7d2deae592
Clean up use of deprecated async_get_registry methods (#72001) 2022-05-17 13:40:19 +02:00
Shay Levy
083d51a727
Cleanup - move Shelly logger to const (#68046) 2022-03-12 14:43:57 +02:00
Shay Levy
2d4d18ab90
Add Shelly gen2 cover support (#67705)
* Add Shelly gen2 cover support

* Make status property
2022-03-08 11:58:08 +02:00
Shay Levy
5359050afc
Add Shelly gen2 error sensors (#66825) 2022-02-19 18:51:01 +02:00
Shay Levy
fa62e7e142
Fix Shelly battery powered devices unavailable (#65031) 2022-01-27 11:00:38 +01:00
epenet
dfdbeba7be
Use entity_description in shelly block sensors (#64897)
* Use entity_description in shelly block sensors

* Re-order binary sensor

* Add async_added_to_hass for BlockSleepingBinarySensor

* Undo None

* Build description when restoring block attribute entities

* Move async_added_to_hass back to base class

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-26 16:07:15 +02:00
epenet
076bc976ee
Use entity_description in shelly rpc sensors (#64895)
* Use entity_description in shelly rpc sensors

* Enable None for binary sensor

* Adjust use_polling_wrapper

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-25 15:48:51 +02:00
epenet
c8a63d4ffc
Use entity_description in shelly rest sensors (#64843)
* Use entity_description in shelly rest sensors

* Use _attr_device_info

* Adjust _attr_unique_id and _attr_device_info

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-24 19:43:43 +02:00
Shay Levy
601f3f9c6d
Add Shelly Gen2 polling for sesnors missing push updates (#64171) 2022-01-17 11:58:54 +02:00
Dave T
8fd60dbd51
Refactor entity_category str types (#62790) 2021-12-27 18:23:08 +01:00
Erik Montnemery
49a27e12ad
Add support to entity registry for overriding device_class (#59985) 2021-11-22 08:38:06 -08:00
Shay Levy
55cd1ffb7c
Revert "Use DeviceInfo in shelly (#58520)" (#59315)
This reverts commit df6351f86b.
2021-11-07 15:29:29 -08:00
Marc Mueller
4c68662612
Use assignment expressions 34 (#58823) 2021-10-31 19:01:16 +01:00
epenet
df6351f86b
Use DeviceInfo in shelly (#58520)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-27 13:44:47 +03:00
Shay Levy
e232bdc082
Add Shelly "installed version" extra state attribute to Gen2 firmware update sensor (#57722) 2021-10-14 19:02:37 -07:00
Maciej Bieniek
3127074f76
Add entity category to Shelly (#57705) 2021-10-14 15:17:00 -07:00
Shay Levy
c8dc5d15ee
Fix: Shelly Gen2 - filter unsupported sensors (#57065) 2021-10-04 13:46:46 -07:00
Marc Mueller
d51487f82a
Import Callable from collections.abc (3) (#56777) 2021-09-29 16:19:06 +02:00
Shay Levy
5249c89c3f
Add Shelly RPC sensor and binary sensor platforms (#56253) 2021-09-17 15:53:39 +03:00
Shay Levy
e9eb76c7db
Add switch support for RPC device (#56153)
* Add switch support for RPC device

* Apply review comments

* Apply review comments
2021-09-13 09:31:35 +03:00
Shay Levy
8c3c2ad8e3
Updated changes for aioshelly 1.0.0 (#56083) 2021-09-11 00:48:55 +03:00
Erik Montnemery
dcb2a211e5
Remove last_reset attribute and set state class to total_increasing for Shelly energy sensors (#54800) 2021-08-18 13:13:35 +02:00
Shay Levy
58ccfff067
Fix Shelly last_reset (#54101) 2021-08-05 19:23:05 -07:00
Simone Chemelli
e9a00ad4ce
Add last reset to Shelly's energy entities (#53710) 2021-07-29 12:10:53 -07:00