Commit Graph

379 Commits (fdf1bfa1407308613814498d71e991ddb323455d)

Author SHA1 Message Date
Raman Gupta 02eba22068
Add additional test coverage for zwave_js meter sensors (#55465) 2021-09-01 17:22:17 -04:00
GitHub Action 368cac7e5d [ci skip] Translation update 2021-08-31 00:17:01 +00:00
Raman Gupta 331726ec2f
Bump zwave-js-server-python to 0.29.1 (#55460) 2021-08-30 09:40:56 -07:00
Raman Gupta d62a78ae61
Don't set zwave_js sensor device class to energy when unit is wrong (#55434) 2021-08-30 08:48:36 -07:00
Raman Gupta ebc2a0103e
Make zwave_js discovery log message more descriptive (#55432) 2021-08-29 20:25:47 -07:00
GitHub Action 291a2d6258 [ci skip] Translation update 2021-08-29 00:11:57 +00:00
Raman Gupta 714564eaa6
Listen to node events in the zwave_js node status sensor (#55341) 2021-08-27 15:01:20 -07:00
GitHub Action 65d14909ee [ci skip] Translation update 2021-08-27 00:14:42 +00:00
GitHub Action 3d7bfa8357 [ci skip] Translation update 2021-08-26 00:13:27 +00:00
GitHub Action ff14a11254 [ci skip] Translation update 2021-08-24 01:55:24 +00:00
Martin Hjelmare 716abaa9b1
Prefer discovered usb device over add-on config in zwave_js (#55056) 2021-08-23 13:50:08 +02:00
Raman Gupta 5f5c8ade41
Fix validation for zwave_js device trigger and condition (#54974) 2021-08-22 20:43:59 -04:00
GitHub Action 305475a635 [ci skip] Translation update 2021-08-23 00:12:20 +00:00
Ville Skyttä 0095c6baeb
Improve device trigger type hinting (#54907) 2021-08-22 20:32:50 +02:00
GitHub Action 45baf88862 [ci skip] Translation update 2021-08-22 00:11:30 +00:00
J. Nick Koston 0403ea715e
Add known devices to USB Vendor / Product IDs (#54986)
Co-authored-by: kpine <keith.pine@gmail.com>
2021-08-21 21:56:49 +02:00
J. Nick Koston a7d8e2b817
Add support for USB discovery to zwave_js (#54938)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-21 09:30:45 -05:00
Ville Skyttä de6e7ea016
Replace *args and **kwargs type hint collections with value types (#54955) 2021-08-21 10:20:09 +03: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 1075a65bbd
Remove Configuration CC as choice in zwave_js value device condition (#54962) 2021-08-21 00:09:27 -04:00
Raman Gupta 1f2134a31a
Use entity descriptions for zwave_js sensors (#53744)
* Use entity descriptions for zwave_js sensors

* reorder

* use new type

* revert typing changes

* switch to using maps

* Get device and state class from discovery instead

* ues constants for keys

* Add meter type attribute and simplify platform data access

* comments

* second refactor

* Add None lookup value

* readability

* Switch base data template to type Any for more flexibility

* Additional changes based on feedback

* rewrite based on new upstream util functions

* Use new combo type

* Handle UnknownValueData in discovery

* bug fixes

* remove redundant comment

* re-add force_update

* fixes and tweaks

* pylint and feedback
2021-08-20 16:25:39 -04:00
Raman Gupta 63f6a3b46b
Add zwave_js.value_updated automation trigger (#54897)
* Add zwave_js automation trigger

* Rename to align with zwave-js api

* Improve test coverage

* Add additional template variables

* Support states values in addition to keys when present

* remove entity ID from trigger payload

* comments and order

* Add init and dynamically define platform_type

* reduce mypy ignores

* pylint

* pylint

* review

* use module map
2021-08-20 15:21:55 -04:00
Raman Gupta 11c6a33594
Bump zwave-js-server-python to 0.29.0 (#54931)
* Bump zwave-js-server-python to 0.29.0

* Cover secure flag true paths for add node WS commands
2021-08-20 14:55:58 -04:00
Raman Gupta ef9ad89c23
Add support for area ID in zwave_js service calls (#54940) 2021-08-20 12:55:17 -04:00
Raman Gupta 3a2afb8bde
Support group entities in zwave_js service calls (#54903) 2021-08-20 11:18:19 +02:00
Raman Gupta 08193169d0
Remove unnecessary signal during zwave_js.reset_meter service call (#54837) 2021-08-18 19:27:41 +02:00
Raman Gupta c1595d5ceb
Only show zwave_js command classes that are on the node (#54794) 2021-08-18 17:53:00 +02:00
Erik Montnemery 5536e24dec
Remove `last_reset` attribute and set state class to `total_increasing` for zwave_js energy sensors (#54818) 2021-08-18 15:11:10 +02:00
Ville Skyttä 939fde0a50
ConfigType and async_setup/setup type hint improvements (#54739) 2021-08-18 13:22:05 +02:00
Raman Gupta cff6883b5c
Add zwave_js Protection CC select entities (#54717)
* Add Protection CC select entities

comment

* Disable entity by default

* use class attribute

* Enable protection entity by default

* add guard for none
2021-08-17 12:22:27 -04:00
Raman Gupta 013b998974
Relax zwave_js lock discovery rules to cover more use cases (#54710) 2021-08-17 13:34:00 +02:00
Raman Gupta a41ee9e870
Create zwave-js select platform and discover additional siren values (#53018)
* Create zwave-js select platform and add siren values to number and select platforms

* use constants while we wait for lib release

* comments

* rename stuff in tests to prepare for protection CC PR

* Switch to 0-1 range for number entity

* Update homeassistant/components/zwave_js/number.py

Co-authored-by: kpine <keith.pine@gmail.com>

* Change step

* Switch to ToneID

* Better error handling

* Add test for coerage

Co-authored-by: kpine <keith.pine@gmail.com>
2021-08-16 13:36:20 -04:00
Raman Gupta 61ab2b0c60
Use zwave_js.number platform for Basic CC values (#54512)
* Use zwave_js.number platform for some Basic CC values

* Remove Basic CC sensor discovery schema

* update comment

* update comment
2021-08-16 12:30:52 -04:00
GitHub Action 370b7f387d [ci skip] Translation update 2021-08-14 00:11:27 +00:00
Erik Montnemery ae507aeed1
Move temperature conversions to sensor base class (8/8) (#54483)
* Move temperature conversions to entity base class (8/8)

* Fix wallbox sensor

* Fix tests
2021-08-11 21:17:16 +02:00
Chris 188919f079
Clean up zwave_js RGB code (#54336) 2021-08-09 18:45:12 +02:00
Raman Gupta c79ee53ab1
Use dict for zwave_js siren.available_tones (#54305)
* Use dict for zwave_js siren.available_tones

* update siren.turn_on service description
2021-08-09 13:29:17 +02:00
Chris 3742333a89
Remove zwave_js transition on individual color channels (#54303) 2021-08-09 13:21:41 +02:00
GitHub Action 98bcdc2cf5 [ci skip] Translation update 2021-08-07 00:10:12 +00:00
Martin Hjelmare c959a0a484
Limit zwave_js meter sensor last reset (#53921) 2021-08-03 22:50:14 +02:00
Joakim Sørensen da3419945c
Rename snapshot -> backup (#53851) 2021-08-02 11:07:21 +02:00
GitHub Action 8c5620e74b [ci skip] Translation update 2021-08-02 03:40:04 +00:00
Joakim Sørensen a9722c90e9
Revert "Rename snapshot -> backup" (#53751)
This reverts commit 9806bda272.
2021-07-30 12:44:10 -07:00
Martin Hjelmare 6d30e596ca
Fix zwave_js current and voltage meter sensor device class (#53723) 2021-07-29 14:26:57 -07:00
Martin Hjelmare 3c0e4b1fd9
Fix zwave_js meter sensor state class (#53716) 2021-07-29 12:25:43 -07:00
Raman Gupta 30cbf03b48
Add energy support for zwave_js meter CC entities (#53665)
* Add energy support for zwave_js meter CC entities

* shrink

* comments

* comments

* comments

* Move attributes

* Add tests

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-07-29 14:18:38 +02:00
Raman Gupta 1019ee22ff
Add enabled attribute to zwave_js discovery model (#53645)
* Add attribute to zwave_js discovery model

* Fix binary sensor entity enabled logic

* Add tests
2021-07-29 09:30:50 +02:00
Raman Gupta e1c6ccb198
Add zwave_js.reset_meter service (#53390)
* Add zwave_js.meter_reset service

* fix log statement

* Add endpoint attribute to service call and rename service

* Make service an entity service

* remove endpoint from service description
2021-07-28 23:15:27 +02:00
Joakim Sørensen 9806bda272
Rename snapshot -> backup (#51629) 2021-07-27 22:43:05 +02:00
Raman Gupta 4b189bd8c5
Add zwave_js WS API commands to get statistics (#53393)
* Add zwave_js WS API commands to get statistics

* update function name

* move nested functions to top level functions
2021-07-26 11:59:16 -04:00
GitHub Action 7fa8586b17 [ci skip] Translation update 2021-07-24 00:08:57 +00:00
Raman Gupta 952cb964c8
Add new input to zwave_js.multicast_set_value service (#53369)
* Tweak Z-Wave JS service and WS API commands

* Revert WS API change so it can be split out

* Add keywords
2021-07-23 10:35:44 -04:00
Raman Gupta 9ee7e55f10
Send initial status in zwave_js WS API cmds to subscribe to updates (#53386) 2021-07-23 10:34:49 -04:00
GitHub Action 969be5c539 [ci skip] Translation update 2021-07-23 00:12:05 +00:00
Paulus Schoutsen ce382a39d0
Block title in strings.json unless internal or allowed (#53304) 2021-07-22 08:37:33 +02:00
Raman Gupta b9a6ce77d1
Bump zwave-js-server-python to 0.28.0 (#53302) 2021-07-22 02:37:10 -04:00
GitHub Action ecf0d4398d [ci skip] Translation update 2021-07-22 00:10:31 +00:00
Raman Gupta 90765132cc
Make additional input for zwave_js device triggers optional (#53134) 2021-07-20 22:08:08 -07:00
Marc Mueller a56485a8c5
Revert new unit types (#53226) 2021-07-20 14:13:51 +02:00
Raman Gupta 05fa220703
Add support for options in zwave_js.set_value service (#53212) 2021-07-20 10:31:12 +02:00
GitHub Action ac9e4cb2f2 [ci skip] Translation update 2021-07-20 00:11:11 +00:00
Ville Skyttä 470f2dd73f
Upgrade pyupgrade to 2.21.2, apply its changes (#52987) 2021-07-19 10:46:09 +02:00
GitHub Action 531733da7b [ci skip] Translation update 2021-07-19 00:09:50 +00:00
Marc Mueller 71a8ae3016
Add new unit types for better type checking (#53124)
* Add new unit types
* Update helper functions
* Update components
* Update lcn climate
2021-07-18 14:43:47 +02:00
GitHub Action 8f3166a955 [ci skip] Translation update 2021-07-18 00:10:14 +00:00
kpine 24cc5c8a0a
Replace local Barrier CC constants with library enums (#53109) 2021-07-17 02:54:11 -04:00
GitHub Action e6e1118dd4 [ci skip] Translation update 2021-07-17 00:09:24 +00:00
p4p3r 9d79c4f617
Add On/Off as target values for zwave_js cover stop action (#52881)
* Add On/Off as target values for stop cover

Certain ZWave Cover devices use On/Off instead of the more common
Open/Close and Up/Down targets for movement.
Adding On/Off to the targets used to stop the cover during movement.
Fixes issue #51963

* Add test for updated zwave_js stop cover logic
2021-07-16 15:48:35 +02:00
GitHub Action 62a2efaf27 [ci skip] Translation update 2021-07-16 00:10:34 +00:00
GitHub Action db8db18b54 [ci skip] Translation update 2021-07-15 00:09:25 +00: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
Raman Gupta 1f15181522
Add support for Z-Wave JS siren (#52948)
* Add support for Z-Wave JS siren

* Add additional device class to discovery

* fix docstring

* Remove device class specific part of discovery schema

* rename test

* switch to entry.async_on_remove

* Fix logic based on #52971

* Use constants to unblock PR

* Add support to set volume level

* Update homeassistant/components/zwave_js/siren.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-07-14 10:14:13 -04:00
Raman Gupta f13a15f2a6
Make zwave_js value updated event logic more performant (#52997) 2021-07-14 08:56:10 +02:00
GitHub Action 7b7062dded [ci skip] Translation update 2021-07-14 00:10:16 +00:00
Raman Gupta 9cbf88d944
Switch to using entry.async_on_remove (#52952) 2021-07-13 10:31:49 +02:00
Raman Gupta 4a058503ca
Change behavior of Z-Wave JS services (#52941)
* Change behavior of Z-Wave JS services

* pop parameters in for loop

* Update logger message
2021-07-13 01:02:36 -04:00
Raman Gupta e915f5be53
Handle FailedCommand exceptions in zwave_js WS API (#52461)
* Handle zwave-js errors in WS API

* Unsubscribe callbacks when zwave-js error is caught

* fix tests

* simplify unsub logic

* add tests

* add kwargs to be safe

* use existing msg format

* switch to generic failed command handling

* remove unneeded constant

* Update homeassistant/components/zwave_js/api.py

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

* Update homeassistant/components/zwave_js/api.py

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

* fix

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-07-13 00:13:43 -04:00
GitHub Action 6723942bf8 [ci skip] Translation update 2021-07-13 00:13:03 +00:00
Raman Gupta e652ef51a1
Initial support for zwave_js device conditions (#52003) 2021-07-11 21:22:33 -07:00
GitHub Action 2ddaf746e6 [ci skip] Translation update 2021-07-12 00:09:46 +00:00
Raman Gupta f234da6379
Bump zwave-js-server-python to 0.27.1 (#52885) 2021-07-11 16:27:46 -04:00
GitHub Action b347226820 [ci skip] Translation update 2021-07-10 00:09:24 +00:00
Chris 92ab471f7b
Add transition support to zwave_js lights (#52160)
* Add transition support to zwave_js lights

* Add transition support to color_switch lights

* simplify and add tests

* fix logic

* add check for color transition to add SUPPORT_TRANSITON supported features

* Use new metadata property

* Use new metadata property

* update tests and device state dump json files

* fix file perms

* update tests and fixtures with new metadata

* update test

* update test

* update tests for color transitions

* check for color tansitions as well

* more tests

* fix color transtions

* remove unneed default

* set add_to_watched_value_ids to false

* set transition default

* properly set default

* update tests

* make sure transition is an int

* suggested changes

* Update homeassistant/components/zwave_js/light.py

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

* Update homeassistant/components/zwave_js/light.py

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

* Update homeassistant/components/zwave_js/light.py

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

* Update homeassistant/components/zwave_js/light.py

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

* Update homeassistant/components/zwave_js/light.py

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

* formatting

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-07-09 12:15:20 -04:00
GitHub Action f7e4db512f [ci skip] Translation update 2021-07-09 00:09:30 +00:00
GitHub Action b5a6d05778 [ci skip] Translation update 2021-07-08 00:13:44 +00:00
Raman Gupta 81fe3583c9
Don't raise when setting HVAC mode without a mode ZwaveValue (#52444)
* Don't raise an error when setting HVAC mode without a value

* change logic based on discord convo and add tests

* tweak
2021-07-06 16:33:07 +02:00
GitHub Action abc9b01ede [ci skip] Translation update 2021-07-05 00:09:10 +00:00
Raman Gupta 8f186957ea
Mark entities for dead zwave_js nodes as unavailable (#48017)
* Don't create any devices or entities for dead zwave_js nodes

* mark entities for dead nodes as unavailable

* add test

* watch for node status updates

* update tests to handle node status changes as well
2021-07-03 22:06:07 -04:00
GitHub Action 86f46753c9 [ci skip] Translation update 2021-07-01 00:12:17 +00:00
Franck Nijhof d3210ada1d
Allow None value return type for Number entity state value (#52302) 2021-06-29 15:07:31 +02:00
Raman Gupta d6fd7dde7f
Bump zwave_js_server to 0.27.0 (#52267) 2021-06-28 18:49:40 -04:00
GitHub Action 5c5e43afc1 [ci skip] Translation update 2021-06-28 00:10:15 +00:00
GitHub Action 473ab98a67 [ci skip] Translation update 2021-06-27 00:09:39 +00:00
GitHub Action cd9fa27f2a [ci skip] Translation update 2021-06-26 00:10:53 +00:00
GitHub Action febc276db9 [ci skip] Translation update 2021-06-25 00:12:31 +00:00
Martin Hjelmare 0e5040d917
Add zwave_js options flow to reconfigure server (#51840) 2021-06-24 13:15:42 +02:00
Raman Gupta 8a9a141f3c
Fix zwave_js migration logic (#52070)
* Fix zwave_js migration logic

* revert change to move tests to new module

* Update tests/components/zwave_js/test_init.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-21 16:45:47 -04:00
Raman Gupta 1e18011603
Adjust zwave_js WS API commands for logging (#51096) 2021-06-17 17:19:25 +02:00
Raman Gupta a250343c55
Support bitmask as a value (#51892)
* Support bitmask as a value

* Fix value schema and add tests

* fix test

* revert change to value schema
2021-06-16 15:53:45 -04:00