Commit Graph
52 Commits
Author SHA1 Message Date
Michael 8238cd9f22 Store runtime data inside the config entry in Shelly (#116763) 2024-05-04 12:41:25 +02:00
Shay Levy ef3ab54f1d Fix Shelly WallDisplay device power (#114071) 2024-03-23 22:44:53 +02:00
Joost Lekkerkerker b125a6b1bb Remove entity description mixin in Shelly (#112938)
* Remove entity description mixin in Shelly

* fix

* Fix
2024-03-10 22:15:23 +01:00
Marc Mueller 930a396712 Add empty line after module docstring [s] (#112704) 2024-03-08 14:33:51 +01:00
Simone Chemelli 780428fde6 Disable Shelly diagnostic binary sensor (#112497) 2024-03-06 13:47:16 +01:00
Simone Chemelli 8cd98a5319 Add Shelly restart required binary sensor (#112493) 2024-03-06 12:37:15 +01:00
Simone Chemelli 7359449636 Code quality for Shelly integration (#109061) 2024-01-30 09:47:52 +01:00
Shay LevyandJ. Nick Koston 28e18ce7bf Fix Shelly Gen1 entity description restore (#108052)
* Fix Shelly Gen1 entity description restore

* Update tests/components/shelly/test_sensor.py

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

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-01-15 20:53:56 +02:00
Erik MontnemeryandJ. Nick Koston 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 bf93929826 Add support for Shelly Gen3 devices (#104874)
* Add support for Gen3 devices

* Add RPC_GENERATIONS const

* Add gen3 to tests

* More tests

* Add BLOCK_GENERATIONS const

* Use *_GENERATIONS constants from aioshelly
2023-12-11 22:58:56 +01: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
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 dea29f539f Use SensorDeviceClass.ENUM and add state attributes translations in Shelly integration (#89660) 2023-03-15 18:52:42 +01:00
Erik Montnemery cc564026fa Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +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
Maciej Bieniek dae7bcf387 Migrate Shelly to the new entity naming style (#86574)
* Use new entity naming style in Shelly

* Suggested change

* Use lower case for gen2 description
2023-01-25 09:55:52 +01:00
Maciej Bieniek a176de6d4b Add RPC smoke binary sensor to Shelly integration (#85697)
* Add RPS smoke binary sensor

* Remove index

* Remove the unnecessary attribute
2023-01-12 08:42:40 +01:00
Shay Levy ea98f0e9e8 Add tests for Shelly binary_sensor platform (#82367)
* Add tests for Shelly binary_sensor platform

* Rename create to register for
2022-11-19 18:07:02 +02:00
Shay Levy 8e9457d808 Add Shelly support for sleeping Gen2 devices (#79889) 2022-10-18 22:42:22 +03:00
starkillerOGandShay Levy 4bdd8cb459 Shelly migrate to update entity (#78305)
* Add update entity

* fixes

* fixes

* change to CONFIG catogory

* return latest version if no update available

* fixes

* Remove firmware binary_sensors and buttons

* import Callable from collections

* remove ota_update tests

* Update homeassistant/components/shelly/update.py

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

* simplify

* fix mypy

* Create test_update.py

* fix isort

* add progress support

* fix styling

* fix update_tests

* fix styling

* do not exclude shelly update test

* bring coverage to 100%

* snake case

* snake case

* change str(x) to cast(str, x)

* simplify tests

* further simplify tests

* Split MOCK_SHELLY_COAP and MOCK_SHELLY_RPC

* fix issort

* fix status test

* fix isort

* run python3 -m script.hassfest

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-09-28 20:21:30 +03:00
Shay Levy 0d94324d58 Clean up Shelly async methods that are not awaiting (#72026) 2022-05-17 10:57:41 -07:00
Shay Levy 5359050afc Add Shelly gen2 error sensors (#66825) 2022-02-19 18:51:01 +02:00
epenetandepenet 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
epenetandepenet 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
epenetandepenet 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
Marc Mueller ae6d9c229e Use const imports [l-z] (#63469) 2022-01-05 18:21:20 +01:00
Robert Hillis 0cf0104662 Use enums in shelly (#62035) 2021-12-16 14:12:23 +01:00
Michael 90e52cd3ad Use relative imports [S-Z] (#61576) 2021-12-13 09:39:13 +01:00
Shay Levy adfbcfa704 Add Shelly Gen1 beta_version attribute to firmware update sensor (#59359) 2021-11-08 21:47:01 +02:00
Michael 6a149706ab add constant CONF_SLEEP_PERIOD (#59195) 2021-11-06 17:32:58 +02: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
Shay Levy 5249c89c3f Add Shelly RPC sensor and binary sensor platforms (#56253) 2021-09-17 15:53:39 +03:00
Shay Levy 8c3c2ad8e3 Updated changes for aioshelly 1.0.0 (#56083) 2021-09-11 00:48:55 +03:00
Matt Krasowski fd66120d6d Handle incorrect values reported by some Shelly devices (#55042) 2021-08-29 14:52:12 +02:00
Maciej Bieniek f1f05cdf1b Use DEVICE_CLASS_UPDATE in Shelly integration (#54746) 2021-08-17 11:57:45 +02:00
Maciej Bieniek 772cbd59d7 Improve typing in Shelly integration (#52544) 2021-07-21 10:11:44 -07:00
Erik Montnemery 14ff6d4d1f Update integrations p-s to override extra_state_attributes() (#47759) 2021-03-11 21:23:20 +01:00
Simone Chemelli 65a2f07a01 Fix missing Shelly external input (#47028)
* Add support for external input (Shelly 1/1pm add-on)

* Make external sensor naming consistent

* Fix case consistency
2021-02-25 09:51:18 +01:00
Shay LevyandPaulus Schoutsen 0875f654c8 Add support for Shelly battery operated devices (#45406)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-02-03 17:03:22 +01:00
Maciej Bieniek 687f90e164 Add motion binary sensor (#44445) 2020-12-31 00:02:56 +01:00
Shay Levy 2498340e1f Fix Shelly uptime sensor (#43651)
Fix sensor to include time zone
Report new value only if delta > 5 seconds
Modify REST sensors class to use callable attributes
2020-11-27 09:40:06 +01:00
982624b3ac Support for Shelly Binary Input Sensors (#43313)
Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-11-19 11:42:24 +01:00
Simone Chemelli 3dbfd2cb70 Add shelly installed firmware info (#43221) 2020-11-19 10:47:23 +01:00
Simone Chemelli d8b067ebf9 Add Shelly support for REST sensors (#40429) 2020-11-11 20:13:14 +01:00
Tomasz 2d9019d4b2 Fix shelly sensor names (#39854) 2020-09-18 14:32:33 +02:00
Maciej Bieniek 748e2696dc Add missing sensors after reworking sensor platform in Shelly integration (#39765) 2020-09-08 23:22:44 +02:00
Paulus Schoutsen b07628ae57 Rework Shelly sensors (#39747)
* Rework Shelly sensors

* Lint

* Add shelly/entity to coveragerc
2020-09-07 14:13:20 +02:00
Maciej BieniekandPaulus Schoutsen 7e50a4999c Add support for Shelly Gas to the Shelly integration (#39478)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-03 10:54:25 +02:00