Commit graph

14 commits

Author SHA1 Message Date
Erik Montnemery
4962605613
Fix enumeration of zwave-js device triggers (#71225)
* Fix enumeration of zwave-js device triggers

* Address review comments
2022-05-03 01:46:39 +02:00
Raman Gupta
9632cbeffa
Improve zwave_js custom triggers and services (#67461)
* Improve zwave_js custom triggers and services

* Switch from pop to get

* Support string boolean values

* refactor and add coverage

* comments and additional assertions
2022-03-05 09:00:31 +01:00
Raman Gupta
113c3149c4
Improve zwave_js device automation strings for config parameters (#66428)
* Improve zwave_js device automation strings for config parameters

* rename things to be more clear

* Match config file format
2022-02-14 15:14:02 -05:00
Raman Gupta
c477378835
Raise when zwave_js device automation fails validation (#65610) 2022-02-04 02:50:47 +01:00
Erik Montnemery
c85bb27d0d
Teach state trigger about entity registry ids (#60271)
* Teach state trigger about entity registry ids

* Tweak

* Add tests

* Tweak tests

* Fix tests

* Resolve entity ids during config validation

* Update device_triggers

* Fix mistake

* Tweak trigger validator to ensure we don't modify the original config

* Add index from entry id to entry

* Update scaffold

* Pre-compile UUID regex

* Address review comment

* Tweak mock_registry

* Tweak

* Apply suggestion from code review
2021-12-02 14:26:45 +01:00
Marc Mueller
eab235173b
Use assignment expressions 28 (#58189) 2021-10-22 14:06:04 +02:00
Raman Gupta
e690d4b006
Add support for zwave_js device actions (#53038)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-28 09:06:02 +02: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
Raman Gupta
5f5c8ade41
Fix validation for zwave_js device trigger and condition (#54974) 2021-08-22 20:43:59 -04:00
Ville Skyttä
0095c6baeb
Improve device trigger type hinting (#54907) 2021-08-22 20:32:50 +02:00
Raman Gupta
726acc38c6
Improve Command Class choices for zwave_js device triggers and conditions (#54970) 2021-08-21 02:57:20 -04:00
Raman Gupta
2be50eb5b4
Add zwave_js device triggers for any zwave value (#54958)
* 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 (#53134) 2021-07-20 22:08:08 -07:00
Raman Gupta
dd908caeba
Add zwave_js device triggers (#51968)
* 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