21 Commits

Author SHA1 Message Date
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
Marc Mueller
702f8180a6 Use TriggerActionType [l-t] (#76813) 2022-08-15 14:00:42 -04:00
epenet
421167c548 Drop GetAutomationsResult and GetAutomationCapabilitiesResult aliases (#72328) 2022-05-23 12:18:17 +02:00
epenet
7ce3e9ad7b Adjust device_automation type hints in shelly (#72196) 2022-05-19 22:33:50 +03:00
Shay Levy
bad245a856 Fix Shelly triggers type hints (#72146) 2022-05-19 11:06:57 +02:00
epenet
7e2f5968cc Adjust device_automation type hints in shelly (#72139) 2022-05-19 10:12:54 +03:00
Shay Levy
c65a50bd2e Fix Shelly error fetching device triggers for sleeping devices (#63103) 2021-12-31 18:47:03 +01:00
Shay Levy
47340802b3 Add Shelly RPC device trigger and logbook platforms (#56428)
* Add RPC device trigger and logbook platforms

* Single input event for Block and RPC

* Add device generation to shelly.click
2021-09-21 00:09:44 +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
Ville Skyttä
b10fc89a6b Automation trigger info type hint improvements (#55402)
* Make automation trigger info a TypedDict

* zwave_js trigger type hint fixes

* Remove redundant automation trigger info field presence checks

* Use async_initialize_triggers in mqtt and tasmota device_trigger tests
2021-09-04 02:25:51 +02:00
Ville Skyttä
0095c6baeb Improve device trigger type hinting (#54907) 2021-08-22 20:32:50 +02:00
Maciej Bieniek
772cbd59d7 Improve typing in Shelly integration (#52544) 2021-07-21 10:11:44 -07:00
Erik Montnemery
76c3058d15 Rename device trigger base schema to DEVICE_TRIGGER_BASE_SCHEMA (#51719) 2021-06-10 19:11:38 +02:00
Shay Levy
34a588d1ba Fix Shelly button first trigger (#49635) 2021-04-24 21:47:18 -07:00
Shay Levy
98396e13af Fix Shelly button device triggers (#48974) 2021-04-09 16:58:44 -07:00
Erik Montnemery
72281f4718 Validate device trigger schemas once (#48319) 2021-03-26 08:09:21 +01:00
Marc Mueller
a3cd1854f6 Update typing 12 (#48073) 2021-03-18 14:31:38 +01:00
Erik Montnemery
0780e52ca4 Support templates in event triggers (#46207)
* Support templates in event triggers

* Don't validate trigger schemas twice
2021-02-08 14:06:27 +01:00
Shay Levy
76537305e2 Add logbook and device trigger platforms to Shelly (#44020)
* Add logbook and device trigger platforms to Shelly

Add `logbook` platform for describing “shelly.click” event
Add `device_trigger` platform for adding automation based on click events:

Example of logbook event:
Shelly 'single' click event for Test I3 channel 3 was fired.
(Test I3 is the name of the device)

Example of automation triggers:
First button triple clicked
First button long clicked and then single clicked
First button double clicked
First button long clicked
First button single clicked and then long clicked
First button single clicked
Second button triple clicked
..
Second button single clicked

* Fix codespell

* Remove pylint added for debug

* Add tests

* Rebase

* Fix Rebase & Apply PR review suggestions

Fix tests after rebasing
Use `INPUTS_EVENTS_DICT` for input triggers
Apply PR suggestions
2021-01-04 23:10:42 +01:00