Commit Graph

38 Commits (e638e5bb4214fef83b64fd42fa02d956b521711d)

Author SHA1 Message Date
Maciej Bieniek 772cbd59d7
Improve typing in Shelly integration (#52544) 2021-07-21 10:11:44 -07:00
Maciej Bieniek 502939c430
Do not configure Shelly config entry created by custom component (#51616) 2021-06-08 13:23:25 +02:00
Maciej Bieniek ed9b199372
Fix exception after removing Shelly config entry and stopping HA (#51321)
* Fix device shutdown twice

* Change if logic
2021-06-01 11:41:34 +03:00
tkdrob d1c4d0de49
Use bool annotations for setup entries (#51166) 2021-05-27 17:39:06 +02:00
Shay Levy be73067f9c
Fix Shelly type hints (#50322) 2021-05-09 19:46:53 +02:00
Simone Chemelli cf96d86985
Add yaml key to Shelly to allow CoAP port customization (#48729)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-05-07 13:23:29 -07:00
J. Nick Koston 87420627a8
Reduce config entry setup/unload boilerplate Q-S (#49778) 2021-04-27 22:10:04 +02:00
Shay Levy 34a588d1ba
Fix Shelly button first trigger (#49635) 2021-04-24 21:47:18 -07:00
Michael 309c3a8d82
Fix init for first added shelly device (#48411) 2021-03-30 23:52:02 +02:00
Maciej Bieniek 0f5efca76b
Fix Shelly sleeping device initialization after reconfiguration (#48076) 2021-03-18 13:26:20 -07:00
Quentame 198ecb0945
Uniformize platform setup (#47101)
* A platform is not a component

* Fix dynalite

* SUPPORTED_PLATFORMS --> PLATFORMS

* In tests

* In tests 2

* Fix SmartThings

* Fix ZHA test

* Fix Z-Wave

* Revert Z-Wave

* Use PLATFORMS const in ambient_station

* Fix ihc comment
2021-03-02 21:43:59 +01:00
Shay Levy adad4a7785
Fix Shelly Polling (#47224) 2021-03-01 17:27:43 +01:00
Maciej Bieniek b8584cab5d
Remove unnecessary gethostbyname() from Shelly integration (#46483) 2021-02-13 12:27:54 +01:00
Shay Levy fefe4a2021
Fix exception in Shelly sleeping device that switches to polling (#45930) 2021-02-04 11:07:30 +01:00
Shay Levy 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
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
Simone Chemelli f07bf6a88e
Cleanup timeouts values for Shelly (#44790)
* Updated timeouts

* Small cleanup

* Fix + small cleanup of test code
2021-01-04 14:04:40 +01:00
Maciej Bieniek f771d8ff14
Change rest sensors update interval for Shelly Motion (#44692)
* Change rest sensors update interval for Shelly Motion

* Cleaning

* Fix typo

* Remove unnecessary parentheses
2021-01-04 13:14:07 +01:00
Simone Chemelli 338938a38e
Fix shelly shutdown AttributeError (#44172)
* Additional check for clean shutdown

* Changed approach

* Remover leftover

* Added callback key

* Moved to listen once
2020-12-30 10:29:54 +01:00
Shay Levy 5fc7df2746
Prevent firing Shelly input events at startup (#43986)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-12-07 09:27:33 +01:00
Shay Levy ebaf143cf6
Support for Shelly Input Events (#43479) 2020-11-25 15:29:01 +01:00
Simone Chemelli 31502e960a
Shelly: minor improvements (#43138) 2020-11-12 19:49:06 +01:00
Simone Chemelli d8b067ebf9
Add Shelly support for REST sensors (#40429) 2020-11-11 20:13:14 +01:00
Shay Levy 8b998365a4
Increase update timeouts used in Shelly integration (#42937)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-11-08 21:49:41 +01:00
Shay Levy f45075eeb5
Use own CoAP lib and support for multicast updates (#42718)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-11-02 16:46:34 +01:00
Maciej Bieniek f855ff8751
Bump aioshelly library to 0.4.0 (#41905)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-10-21 13:37:17 +02:00
Maciej Bieniek 088558b8df
Increase the timeout during config entry setup in Shelly integration (#40684) 2020-09-27 23:03:47 +02:00
Maciej Bieniek 663245c351
Fix OSError (#40393) 2020-09-21 21:10:02 +02:00
Paulus Schoutsen 1e2741ff1b
Some shelly fixes (#39798) 2020-09-08 15:12:20 +02:00
Simone Chemelli 0c8630a2f0
Support shelly cover(roller) mode (#39711)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-08 10:35:01 +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 Bieniek f29154011e
Bump aioshelly library to 0.3.0 (#39716) 2020-09-06 10:34:51 -05:00
Simone Chemelli 1fffa748e5
Improve handling of DHCP devices (#39683) 2020-09-06 00:17:10 +02:00
On Freund 963651d6f2
Add support for authenticated Shelly devices (#39461)
* Add support for authenticated Shelly devices

* Fix comment typos

* Update homeassistant/components/shelly/config_flow.py

Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>

* Fix unauthenticated devices

* Update homeassistant/components/shelly/config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Code review fixes

* More code review fixes

* Fix typo

* Update homeassistant/components/shelly/config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-09-01 08:08:37 -04:00
Maciej Bieniek 4aa8b6cad8
Add basic binary_sensor support to Shelly (#39365) 2020-08-30 14:16:41 +02:00
Paulus Schoutsen 4b8217777e
Add basic light and sensor support to Shelly (#39288)
* Add basic light platform

* Add sensor support

* Bump aioshelly to 0.2.1

* Lint

* Use UNIT_PERCENTAGE

Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>

* Format sensor.py

Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
2020-08-28 17:33:34 +02:00
Ville Skyttä b4bac0f7a0
Exception chaining and wrapping improvements (#39320)
* Remove unnecessary exception re-wraps

* Preserve exception chains on re-raise

We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.

The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.

Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.

* Fix mistaken re-wrap in homematicip_cloud/hap.py

Missed the difference between HmipConnectionError and
HmipcConnectionError.

* Do not hide original error on plex new cert validation error

Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
2020-08-28 13:50:32 +02:00
Paulus Schoutsen ca2bc9906d
Add Shelly integration (#39178) 2020-08-24 12:43:31 +02:00