1
0
mirror of https://github.com/home-assistant/core.git synced 2025-05-03 21:49:17 +00:00

133 Commits

Author SHA1 Message Date
Simone Chemelli
a170e32852
Deprecate Shelly state attributes () 2025-03-18 17:29:21 +02:00
Simone Chemelli
12f5bd2aea
Add dedicated sensors for extra_state_attributes in Shelly integration ()
* Add dedicated sensors for extra_state_attributes in Shelly integration

* add tests

* apply review comment

* fix text syntax

* add gas test

* update strings

* add icons
2025-03-18 11:48:18 +01:00
Shay Levy
9b57a831f7
Fix Shelly Air lamp life sensor () 2025-03-17 17:33:11 +02:00
Simone Chemelli
2fd91e7f9c
Remove unknown from Shelly sensor state () 2025-03-15 18:10:35 +01:00
Erik Montnemery
f83c8de8d3
Update signature of platforms' async_setup_entry () 2025-02-10 21:08:03 +01:00
Maciej Bieniek
6ff733b225
Set the device class for the Shelly virtual sensor ()
* Map sensor role to the device class

* Add test

* Fix docstring
2025-02-07 17:36:26 +02:00
Maciej Bieniek
11d44e608b
Add additional entities for Shelly BLU TRV ()
* Add valve position sensor

* Add valve position and external sensor temperature numbers

* Fix method name

* Better name

* Add remove condition

* Add calibration binary sensor

* Add battery and signal strength sensors

* Remove condition from ShellyRpcEntity

* Typo

* Add get_entity_class helper

* Add tests

* Use snapshots in tests
2025-01-21 00:11:20 +02:00
Maciej Bieniek
86ea68eaec
Add missing total active returned energy sensor for Shelly Mini PM Gen3 ()
Add missing total active returned energy sensor for Mini PM Gen3
2025-01-13 11:12:04 +01:00
Maciej Bieniek
e43f72c452
Add support for xvoltage sensor for Shelly Plus UNI ()
* Add support for xvoltage sensor

* Cleaning
2025-01-03 15:27:47 +01:00
Maciej Bieniek
1290f18ed4
Add support for Shelly CCT light ()
* Initial support for cct lights

* Move properties to the RpcShellyCctLight class

* Fix entity names

* Add async_remove_orphaned_entities() function

* Do not return

* Fix tests

* Combine async_remove_orphaned_virtual_entities and async_remove_orphaned_entities

* Remove SHELLY_PLUS_RGBW_CHANNELS from const

* Add tests

* Use _attr*

* Check ColorMode.COLOR_TEMP

* Add sensors for CCT light

* Remove removal condition

* Remove orphaned sensors

* Cleaning

* Add device temperature sensor for CCT light

* Simplify async_remove_orphaned_entities()

* Comment

* Add COMPONENT_ID_PATTERN const

* Call async_add_entities once

* Suggested change

* Better type for keys

* Do not call keys()
2024-10-04 08:49:35 +02:00
Maciej Bieniek
6906ee0e48
Improve Shelly RPC entity naming ()
* Fix default names for cover entities

* Drop component index if only one component exists

* Improve doc strings

* Use more consistent naming

* Typo

* Revert removing index 0 from entity names

* Improve names for RGB(W) lights
2024-09-15 11:29:26 +02:00
J. Nick Koston
f9bf7f7e05
Small cleanups to shelly () 2024-08-27 21:00:31 -10:00
Maciej Bieniek
d8fe3c5377
Add missing units for xpercent, xfreq and xcounts Shelly sensors () 2024-08-26 08:59:18 -10:00
Maciej Bieniek
ec0012209d
Add missing sensors for Shelly Plus RGBW PM ()
* Add missing sensors for Shelly Plus RGBW PM

* Add tests
2024-08-18 12:58:51 +03:00
Maciej Bieniek
bf0e5baa76
Add support for Shelly enum virtual component ()
* Support enum virtual component

* Add tests

* Cleaning

* Improve test for select

* Use values

* Update tests

* Use the option title for sensor

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-07-18 17:55:14 +03:00
Maciej Bieniek
260e98c3f7
Add support for Shelly number virtual component ()
* Support number component in field mode

* Support number in label mode

* Add tests

* Add mode_fn

* Add support for number component in slider mode

* Add comment

* Suggested change

* Revert max_fn

* Change unit 'min' to 'Hz' in test

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-07-15 22:26:12 +02:00
Maciej Bieniek
3ef1e5816e
Add support for Shelly text virtual component ()
* Add support for text component

* Add tests

* Improve const names

* Remove unnecessary code

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-07-12 12:58:21 +02:00
Maciej Bieniek
dbe98de82a
Fix pulse counter frequency sensors for Shelly Plus Uni ()
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-07-05 09:40:43 +02:00
Maciej Bieniek
54f8b5afdf
Add pulse counter frequency sensors to Shelly ()
* Add pulse counter frequency sensors

* Cleaning

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-06-18 23:08:30 +02:00
Michael
8238cd9f22
Store runtime data inside the config entry in Shelly () 2024-05-04 12:41:25 +02:00
Shay Levy
ef3ab54f1d
Fix Shelly WallDisplay device power () 2024-03-23 22:44:53 +02:00
Maciej Bieniek
d8f74571a1
Add removal condition to Shelly battery sensor ()
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-03-17 21:21:42 +01:00
Joost Lekkerkerker
b125a6b1bb
Remove entity description mixin in Shelly ()
* 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] () 2024-03-08 14:33:51 +01:00
Shay Levy
c690a9df83
Fix Shelly RPC RSSI sensor removal () 2024-02-20 21:05:59 -06:00
Maciej Bieniek
2bd64dba6b
Add removal_condition for Shelly analog input sensors ()
* Add remove condition for analog input sensors

* xpercent key is not present in the payload if it has not been configured

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-02-12 20:13:11 +01:00
Maciej Bieniek
4f277b9509
Add pulse counter sensors for Shelly ()
* Add pulse counter sensors to Shelly

* Add a unit for the pulse counter

* Fix removal condition

* xtotal key is not present in the payload if it has not been configured

* Update test

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-02-12 09:42:38 +01:00
Maciej Bieniek
326da81656
Add icon translations to Shelly ()
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-02-11 14:07:10 -06:00
Maciej Bieniek
b5b09446a1
Add analog input value sensor for Shelly ()
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-02-07 10:22:00 -06:00
Maciej Bieniek
fe0228139e
Do not use a battery device class for Shelly analog input sensor ()
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-02-01 17:07:08 +01:00
Simone Chemelli
6174aa4e59
Remove Shelly RSSI sensor if Wi-FI is not configured ()
* Remove Shelly RSSI sensor if Wi-FI is not configured

* fix tests
2024-01-30 21:18:54 +01:00
Simone Chemelli
7359449636
Code quality for Shelly integration () 2024-01-30 09:47:52 +01:00
Shay Levy
28e18ce7bf
Fix Shelly Gen1 entity description restore ()
* 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
Maciej Bieniek
8181fbab5c
Fix device_class type for Shelly Gen1 sleeping sensors () 2024-01-09 12:01:19 -10:00
Maciej Bieniek
d59142a595
Add missing sensors for Shelly Pro Dimmer 2PM ()
Add missing sensors for Shelly Pro Dimmer 2
2023-12-25 07:02:57 +01:00
Erik Montnemery
0c2485bc03
Freeze integration entity descriptions ()
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 ()
* 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
e1f4a3fa9f
Add energy meter sensors for Shelly Pro EM ()
* 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
17050a3286
Add support for Shelly Gas Valve addon ()
* 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
d5338e88f2
Fix the availability condition for Shelly N current sensor () 2023-08-18 10:49:43 +02:00
Maciej Bieniek
9910da2f3d
Add neutral current sensor for Shelly 3EM () 2023-08-08 16:47:18 +02:00
Maciej Bieniek
9f9602e8a7
Add frequency sensor for Shelly Plus/Pro xPM devices () 2023-07-24 23:07:57 +02:00
Maciej Bieniek
17e757af36
Add sensors for Shelly Plus PM Mini () 2023-07-24 19:53:39 +02:00
Maciej Bieniek
c61c6474dd
Add frequency and N current sensors for Shelly Pro 3EM () 2023-07-23 21:33:47 +02:00
Maciej Bieniek
9f98a418cd
Add new sensors for Shelly Pro 3EM ()
* Add new sensors

* Fix typo
2023-07-21 18:18:14 +03:00
Maciej Bieniek
fe61672792
Don't inherit SensorEntity/NumberEntity and RestoreEntity in Shelly integration ()
* 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
eb058a3d41
Add illuminance sensor for Shelly gen2 devices () 2023-05-25 23:10:44 +02:00
epenet
c475273145
Prevent SensorEntity and RestoreEntity inheritance () 2023-05-24 12:49:35 +02:00
Maciej Bieniek
dea29f539f
Use SensorDeviceClass.ENUM and add state attributes translations in Shelly integration () 2023-03-15 18:52:42 +01:00
Maciej Bieniek
79bcdf43f7
Add current sensor for Shelly RPC devices () 2023-03-01 16:26:20 +01:00