Commit graph

5 commits

Author SHA1 Message Date
Ville Skyttä
0095c6baeb
Improve device trigger type hinting () 2021-08-22 20:32:50 +02:00
Raman Gupta
726acc38c6
Improve Command Class choices for zwave_js device triggers and conditions () 2021-08-21 02:57:20 -04:00
Raman Gupta
2be50eb5b4
Add zwave_js device triggers for any zwave value ()
* Add zwave_js device triggers for any zwave value

* translations

* Validate value
2021-08-21 00:09:52 -04:00
Raman Gupta
90765132cc
Make additional input for zwave_js device triggers optional () 2021-07-20 22:08:08 -07:00
Raman Gupta
dd908caeba
Add zwave_js device triggers ()
* Initial support for zwave_js device triggers

* lint

* Add node status changed trigger

* comments

* create helper function and simplify trigger logic

* simplify code

* fix exception

* remove unused type ignore

* switch to append to make future changes easier

* make exception consistent

* Add state config schema validation

* comment

* remove 0 from falsy check

* increase test coverage

* typos

* Add central scene and scene activation value notification triggers

* reorder things for readability and enumerate node statuses

* Add support for Basic CC value notifications

* fix schemas since additional fields on triggers aren't very flexible

* pylint

* remove extra logger statement

* fix comment

* dont use get when we know key will be available in dict

* tweak text

* use better schema for required extra fields that are ints

* rename trigger types to make them easier to parse

* fix strings

* missed renaming of one trigger type

* typo

* Fix strings

* reduce complexity

* Use Al's suggestion for strings

* add additional failure test cases

* remove errant logging statement

* make CC required

* raise vol.Invalid when value ID isn't legit to prepare for next PR

* Use helper function

* fix tests

* black
2021-07-14 14:14:36 -04:00