Commit graph

95 commits

Author SHA1 Message Date
Maciej Bieniek
1290f18ed4
Add support for Shelly CCT light (#126989)
* 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 (#125415)
* 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
76182c246d
Auto configure outbound websocket for sleepy shelly RPC devices (#124545) 2024-08-26 08:37:36 -10:00
Maciej Bieniek
bf0e5baa76
Add support for Shelly enum virtual component (#121997)
* 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 (#121894)
* 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
50751574b4
Fix configuration_url for Shelly device using IPv6 (#121939)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-07-15 08:31:44 +02:00
Maciej Bieniek
3ef1e5816e
Add support for Shelly text virtual component (#121735)
* 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
70f05e5f13
Add support for Shelly virtual boolean component (#119932)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-07-10 23:51:51 +02:00
epenet
e7ce01e649
Enforce namespace import in components (#118218) 2024-05-27 12:50:11 +02:00
Shay Levy
d84890bc59
Bump aioshelly to 10.0.0 (#117728) 2024-05-19 19:25:12 +02:00
Maciej Bieniek
51bceb1c99
Fix climate entity creation when Shelly WallDisplay uses external relay as actuator (#115216)
* Fix climate entity creation when Shelly WallDisplay uses external relay as actuator

* More comments

* Wrap condition into function

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-04-25 21:06:52 +02:00
Shay Levy
3e99afdd54
Cleanup Shelly RGBW light entities (#114410) 2024-03-30 18:48:57 +03:00
Shay Levy
121182167f
Fix Shelly reauth flow (#114180)
* Fix Shelly reauth flow

* Rename shutdown_device to async_shutdown_device
2024-03-25 23:27:44 +02:00
Simone Chemelli
8728057b1b
Add support for Shelly RPC devices custom TCP port (#110860)
* First coding

* add port to config_entry + gen1 not supported msg

* fix async_step_credentials

* strings

* fix reauth

* fix visit device link

* increased MINOR_VERSION

* apply review comments

* align to latest aioshelly

* missing tests

* introduce port parameter

* update tests

* remove leftover

* remove "port" data_description key

* missing key

* apply review comments

* apply more review comments

* Add tests

* apply review comment

* apply review comment (part 2)

* description update

* fine tuning description

* fix test patching

---------

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2024-03-21 19:58:56 +01:00
Joost Lekkerkerker
05172d8e4d
Improve loops and lists (#113269)
* Enable PERF

* Enable PERF rule

* Enable PERF rule

* Don't enable flag yet
2024-03-14 10:22:20 +01:00
Joost Lekkerkerker
77917506bb
Improve lists in integrations [R-S] (#113233)
* Improve lists in integrations [R-S]

* Fix

* Fix
2024-03-13 21:55:00 +01:00
Simone Chemelli
4095de0566
Allow Shelly CoAP to honour default network adapter (#110997)
* Allow Shelly CoAP to honor default network adapter

* apply review comment

* 1 more debug log line

* adapt code to library changes

* test

* improve test

* one more test
2024-03-11 09:52:15 +01:00
Marc Mueller
930a396712
Add empty line after module docstring [s] (#112704) 2024-03-08 14:33:51 +01:00
Shay Levy
c690a9df83
Fix Shelly RPC RSSI sensor removal (#111035) 2024-02-20 21:05:59 -06:00
Simone Chemelli
538ef7764e
Move Shelly thermostat check to status endpoint (#110543)
* Move Shelly thermostat check to status endpoint

* fix key path
2024-02-14 16:36:42 +01:00
Simone Chemelli
d4c91bd0b7
Add a repair issue for Shelly devices with unsupported firmware (#109076)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-01-30 10:59:33 -10:00
Maciej Bieniek
afcf8c9718
Get Shelly RPC device gen from config entry data (#107019)
Use gen from config entry data
2024-01-03 19:45:59 -05:00
Erik Montnemery
a4357409c8
Fix Shelly consumption_types (#106273) 2023-12-22 22:58:59 +01: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
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
Maciej Bieniek
b7bf1e9f3f
Make Shelly Wall Display thermostat implementation compatible with firmware 1.2.5 (#104812) 2023-11-30 17:26:07 +01:00
Maciej Bieniek
14387cf94b
Remove Shelly Wall Display switch entity only if the relay is used as the thermostat actuator (#104506) 2023-11-26 14:46:29 +01: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
dbe193aaa4
Add release_url property of Shelly update entities (#103739) 2023-11-15 13:36:20 +01: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
439ca60cb6
Fix Shelly Gen2 event get input name method (#100733) 2023-09-23 12:45:41 +03: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
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
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
Marc Mueller
9e67bccb89
Replace EventType annotations with Event (#96426) 2023-07-18 08:51:06 +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
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
Erik Montnemery
a71c097aeb
Revert "Allow setting an entity's name by its device class" (#93539) 2023-05-25 17:20:54 +02:00
Erik Montnemery
67c1051305
Allow setting an entity's name by its device class (#90767)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-05-09 18:55:55 +02:00
Shay Levy
3cb9b273c9
Add Shelly Pro 3EM energy sensors (#86476)
* Add Shelly Pro 3EM energy sensors

* Add total and total returned energy counters

* Set single phase energy counters disabled by default
2023-02-03 23:18:59 +02: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
ae6bc96002
Shelly code quality (#86733) 2023-01-27 10:47:05 +02: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
Shay Levy
e15aaf2853
Fix Shelly RPC key instances handling (#86479)
Fix Shelly key instances handling
2023-01-23 22:12:29 +02:00
Shay Levy
d5797d9f7d
Cleanup Shelly imports (#86359)
* Cleanup Shelly imports

* Cleanup tests
2023-01-22 01:26:54 +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
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
Shay Levy
111a38589e
Shelly code quality - use properties for status (#83421) 2022-12-07 00:00:45 +02:00
Shay Levy
e1923bc13b
Add Shelly support for Plus WallDimmer US (#83385) 2022-12-06 19:44:17 +02:00