Commit Graph

267 Commits (ea6e32576259728760c20ca91a5ac90ce9081193)

Author SHA1 Message Date
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
Raman Gupta 3db8d9ede5
Require admin for new node status WS API command (#51863) 2021-06-15 09:34:04 +02:00
Raman Gupta 8705168fe6
Add zwave_js WS API cmds to get node state and version info (#51396)
* Add zwave_js view to retrieve a node's state

* remove typehints

* Make dump views require admin

* Add version info to node level dump

* Add back typehints

* switch from list to dict

* switch from dump node view to two WS API commands

* switch to snake
2021-06-14 16:43:51 -04:00
Raman Gupta f00f2b4ae4
Add zwave_js ping node service (#51435)
* Add zwave_js ping node service

* uncomment code

* use asyncio.gather
2021-06-14 16:38:35 -04:00
Raman Gupta 0d40ba463e
Create zwave_js node status sensor when the node is added (#51850)
* Create node status sensor when the node is added

* Handle race condition

* reduce repeat code
2021-06-14 19:31:44 +02:00
Martin Hjelmare c3cfbfe54b
Refactor zwave_js config flow (#51720) 2021-06-12 13:12:17 +02:00
Martin Hjelmare be137b085b
Refactor zwave_js disconnect client helper (#51718) 2021-06-12 11:35:33 +02:00
GitHub Action c81df50191 [ci skip] Translation update 2021-06-06 00:19:43 +00:00
Raman Gupta b3327e1656
Bump zwave-js-server-python to 0.26.1 (#51425) 2021-06-03 15:11:45 -04:00
Raman Gupta ba6a0b5793
Fix no value error for heatit climate entities (#51392) 2021-06-02 21:07:47 -07:00
Martin Hjelmare 91b6f9d7d0
Bump zwave-js-server-python to 0.26.0 (#51341) 2021-06-01 19:26:54 +02:00
Raman Gupta b91696c139
Switch to using entity class attributes where possible in zwave_js (#51207)
* Switch to using entity class attributes where possible in zwave_js

* fix

* revert docstring

* remove unused init

* Revert some changes based on feedback in #51181

* switch to class atributes
2021-06-01 10:26:22 +02:00
Raman Gupta a8650f4e59
Add zwave_js node status sensor (#51181)
* Add zwave_js node status sensor

* fix import

* use parent class name property

* Use more entity class attributes

* Update homeassistant/components/zwave_js/sensor.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* return static values in property method

* fix PR

* switch to class atributes

* create sensor platform task if needed

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-05-31 08:46:28 +02:00