Commit Graph

345 Commits (aa50096a318ca8b90981ece63317bfdc839be714)

Author SHA1 Message Date
Martin Hjelmare 5642350070
Add zwave_js sensor entity categories (#58416) 2021-10-25 18:14:44 +02:00
Ville Skyttä 0de95610e3
Use http.HTTPStatus in components/[wxyz]* (#58330) 2021-10-24 17:25:01 +02:00
Raman Gupta 3476b430db
Convert val to str when needed while calling zwave_js.set_value (#57216) 2021-10-07 13:22:33 -07:00
Paulus Schoutsen a4d9019ffc
Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
Raman Gupta 3c074ab865
Add additional properties to node_status WS cmd (#56927)
* Add node.zwave_plus_version to node_status WS command

* Add highest security class to node_status
2021-10-05 11:23:44 -04:00
Martin Hjelmare 12b2076351
Fix zwave_js config flow import step (#56808) 2021-09-30 01:15:05 +02:00
Martin Hjelmare fa716d92ad
Manage s2 keys in zwave_js (#56783) 2021-09-29 15:04:24 -07:00
Martin Hjelmare 50fffe48f8
Add zwave to zwave_js migration (#56159)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-09-29 08:55:27 -07:00
Raman Gupta e76ddb4b27
Add proper S2 support for adding zwave_js nodes (#56516)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-28 15:37:45 -07: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
Marius 4ce7166afd
Add node sensor status icons (#56137)
Co-authored-by: kpine <keith.pine@gmail.com>
Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
2021-09-27 12:50:14 +02:00
Raman Gupta 8716aa011a
Add support for multilevel switch CC select entities (#56656)
* Add support for multilevel switch CC select entities

* Use state names from docs and include more device identifiers from device DB

* black

* pylint

* type fix

* Add failure scenario test

* Update homeassistant/components/zwave_js/select.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-26 14:22:41 -04:00
Raman Gupta b1f4ccfd6b
Reuse zwave_js device when replacing removed node with same node (#56599)
* Reuse zwave_js device when a removed node is replaced with the same node

* Ensure change is backwards compatible with servers that don't include replaced

* Remove lambda

* Add assertions to remove type ignores

* fix tests by always copying state and setting manufacturer/label attributes
2021-09-25 10:43:37 +02:00
Raman Gupta c785983cce
Handle entity creation on new added zwave_js value (#55987)
* Handle new entity creation when a new value is added

* spacing

* Update homeassistant/components/zwave_js/__init__.py

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

* change variable name and use asyncio.gather

* Centralized where discovered value IDs gets managed

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-10 23:49:31 +02:00
Raman Gupta 113288cb1f
Fix zwave_js/node_state WS API command (#55979)
* Fix zwave_js/node_state WS API command

* Add negative assertion check to avoid regression

* Update tests/components/zwave_js/test_api.py

Co-authored-by: jan iversen <jancasacondor@gmail.com>

* use constant

Co-authored-by: jan iversen <jancasacondor@gmail.com>
2021-09-09 14:04:27 -04:00
Martin Hjelmare b088ce601c
Bump zwave-js-server-python to 0.30.0 (#55831) 2021-09-06 13:37:12 -07:00
J. Nick Koston d8a81a54d8
Narrow zwave_js USB discovery (#55613)
- Avoid triggering discovery when we can know in advance the
  device is not a Z-Wave stick
2021-09-03 05:11:03 +02:00
Raman Gupta 02eba22068
Add additional test coverage for zwave_js meter sensors (#55465) 2021-09-01 17:22:17 -04:00
Raman Gupta 331726ec2f
Bump zwave-js-server-python to 0.29.1 (#55460) 2021-08-30 09:40:56 -07:00
Raman Gupta 714564eaa6
Listen to node events in the zwave_js node status sensor (#55341) 2021-08-27 15:01:20 -07:00
J. Nick Koston e6e8d7eded
Convert color temperature to visible color in lights (#55219) 2021-08-25 21:56:36 +02: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
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
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 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 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
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
Dror Eiger 7e211965e4
Update the Qubino Flush Shutter fixture (#54387) 2021-08-10 10:31:55 -04: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
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
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
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
Raman Gupta b9a6ce77d1
Bump zwave-js-server-python to 0.28.0 (#53302) 2021-07-22 02:37:10 -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 05fa220703
Add support for options in zwave_js.set_value service (#53212) 2021-07-20 10:31:12 +02: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
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 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
Raman Gupta e652ef51a1
Initial support for zwave_js device conditions (#52003) 2021-07-11 21:22:33 -07: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
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
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
Martin Hjelmare 0e5040d917
Add zwave_js options flow to reconfigure server (#51840) 2021-06-24 13:15:42 +02:00
Raman Gupta 0eae0cca2b
Move zwave_js migration tests into new module (#52075) 2021-06-21 20:42:03 -04: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 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 ba6a0b5793
Fix no value error for heatit climate entities (#51392) 2021-06-02 21:07:47 -07: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
Raman Gupta ca8d09e5e1
Add zwave_js.multicast_set_value service (#51115)
* Add zwave_js.multicast_set_value service

* comment

* Add test for multiple config entries validation

* additional validation test

* brevity

* wrap schema in vol.Schema

* Update homeassistant/components/zwave_js/services.py

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

* do node transform and multicast validation in schema validation

* move poll value entity validation into schema validation, pass helper functions dev and ent reg instead of retrieving it every time

* make validators nested functions since they don't neeed to be externally accessible

* Update homeassistant/components/zwave_js/services.py

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

* Remove errant ALLOW_EXTRA

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-27 21:57:35 -04:00
Raman Gupta 877d3e38b4
Fix zwave_js.set_value schema (#51114)
* fix zwave_js.set_value schema

* wrap all schemas in vol.Schema

* readd removed assertions
2021-05-27 00:27:35 -04:00
Raman Gupta 18e6ae8750
Add WS API commands to check for and install zwave_js config updates (#51106) 2021-05-26 08:39:08 -07:00
Raman Gupta 6d9b67ddb2
Add zwave_js heal node and network WS API commands (#51047)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-26 08:38:02 -07:00
Raman Gupta 1de0d20a76
Bump zwave-js-server-python to 0.25.1 (#51097)
* Bump zwave-js-server-python to 0.25.1

* update fixtures
2021-05-26 12:37:24 +02:00
Raman Gupta 5f7964b54b
Add firmware updates support for zwave_js (#50390)
* Add WS API support for zwave_js firmware updates

* move file to fixture

* review comments

* fix logic and test based on upstream changes

* handle failure scenario

* handle failure scenario

* fix tests and adjust message

* Update homeassistant/components/zwave_js/api.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* remove return from firmware upload view because client will raise an exception if not successful

* raise if user is not an admin

* raise bad request exception if firmware command fails

* incorporate #50923

* Add test for failed command

* add event name to messages

* change error to not found

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-05-26 02:57:00 -04:00
Raman Gupta c0234df136
Remove device_registry fixture from zwave_js tests (#51072) 2021-05-25 08:48:21 -07:00
Raman Gupta 4875035ff8
Add zwave_js WS API commands for node ping and metadata (#51049) 2021-05-25 17:37:12 +02:00
Martin Hjelmare 9319fc6263
Update zwave_js stored add-on options (#51063)
* Update zwave_js entry data if add-on data changed

* Fix tests

* Add test
2021-05-25 08:37:34 -04:00
Martin Hjelmare bdb8cdf717
Fix zwave_js None color value (#50926) 2021-05-25 13:40:22 +02:00
Raman Gupta ebf6e3d985
Add zwave_js WS API commands to replace and remove failed nodes (#51018)
* Add zwave_js WS API commands to replace and remove failed nodes

* no need to manually add node to driver in test
2021-05-24 13:11:09 -04:00
Martin Hjelmare 07e2f53b37
Add zwave_js add-on info dataclass (#50776) 2021-05-21 13:47:37 +02:00
Ville Skyttä 19d25cd901
Change config entry state to an enum (#49654)
* Change config entry state to an enum

* Allow but deprecate EntryState str equality comparison

* Test fixes

* Rename to ConfigEntryState

* Remove str comparability backcompat

* Update new occurrences of strs cropped up during review
2021-05-20 19:19:20 +02:00
Dror Eiger 0556c35e24
Set zwave_js cover device_class for shutters and blinds (#50643)
* Set device_class for shutters and blinds

* Add missing. imports

* Add tests for device class setting

* Clean up

* Avoid storing the node in an unused variable

* Fix entity name

* Extend qubino shutter discovery

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-16 08:26:16 +02:00
Charles Garwood f33b45ec82
Add interview feedback for Z-Wave JS add node websocket (#50384)
* Add interview feedback for add node websocket

* cleanup leftover logging

* add tests

* test interview failed event

* fix event type

* include manufacturer & model from device registry

* update test
2021-05-14 09:47:09 -04:00
Raman Gupta 1b81849271
Add zwave_js support for HeatIt Z-TRM2fx (#50317)
* Add zwave_js support for HeatIt Z-TRM2fx

* fix docstring

* use AwesomeVersion to support firmware version ranges

* add guard against empty firmware range

* switch guard approach to raise exception sooner

* make post init more generic

* Set up firmware range schema as AwesomeVersion during initialization

* Update homeassistant/components/zwave_js/discovery.py

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

* Allow min_ver and max_ver to be None

* fix docstring

* reduce import scope

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-09 15:28:35 -04:00
Martin Hjelmare 5ec09eab42
Move not loaded websocket constant to zwave_js (#50188) 2021-05-06 17:59:03 -07:00
Martin Hjelmare 38d7652176
Fix zwave_js websocket api KeyError on unloaded entry (#50154) 2021-05-06 16:43:14 +02:00
Raman Gupta fdc29d6a80
Add device specific discovery for Heatit Z-TRM3 thermostat (#49804)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-30 16:10:25 +02:00
Erik Montnemery 956c972e72
Add color_mode support to zwave_js light (#49588) 2021-04-30 13:46:25 +02:00
Franck Nijhof c68b259bd3
Cleanup of unused connection_class logic (#49865)
Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2021-04-29 23:12:58 +02:00
Chris e85d58c3a1
Fix white_value causing zwave-js to set non-existing values (#49799) 2021-04-28 09:23:48 -07:00
Raman Gupta 795fe18a90
Add additional zwave_js WS API commands for nodes (#49509)
* Add zwave_js WS API commands for node.refresh_values and node.refresh_cc_values

* remove guard since API will be used by frontend

* add missing validation

* use get in case node ID is wrong

* use decorator

* add additional coverage
2021-04-28 10:22:18 -04:00
Martin Hjelmare 9e1042d9e0
Fix zwave_js flow set add-on options (#49813)
* Fix zwave_js flow set add-on options

* Improve and deduplicate error messages

* Add more call assertions

* Add final missing call assertion
2021-04-28 15:09:39 +02:00
Raman Gupta 1cb907c2e3
Add zwave_js discovery schema for Vision Security ZL7432 (#49510)
* Add zwave_js discovery schema for Vision Security ZL7432

* add tests

* fix test

* add correct fixture

* Make discussed changes

* fix tests

* move event handler

* fix logic to get entity ID

* add test

* make discovery test more explicit

* remove domain from event data

* always provide entity_id key to make automations easier and translate value if possible

* formatting

* comment

* dont overwrite value
2021-04-28 10:22:54 +02:00
Ville Skyttä a396619251
Use disabled_by constants (#49584)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-04-23 09:56:42 +02:00
Raman Gupta 99c5087c1e
Add WS API command to capture zwave_js logs from server (#49444)
* Add WS API commands to capture zwave_js logs from server

* register commands

* create a task

* Update homeassistant/components/zwave_js/api.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/zwave_js/api.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* fix

* fixes and add test

* fix PR on rebase

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-04-21 07:37:35 -04:00
Charles Garwood cad281b326
Add subscription for Z-Wave JS node re-interview status (#49024)
* Add subscription for interview status

* update test

* forward stage completed event

* add additional test

* additional tests

* return earlier
2021-04-21 07:35:16 -04:00
Raman Gupta 6e22251e1d
Add support to enable/disable zwave_js data collection (#49440) 2021-04-20 21:40:54 -04:00
Raman Gupta cf16e651cf
Bump zwave_js dependency to 0.24.0 (#49445)
* Bump zwave_js dependency to 0.24.0

* fix bug in schema

* fix test
2021-04-20 23:44:26 +02:00
Raman Gupta fe6d6895aa
Migrate existing zwave_js entities if endpoint has changed (#48963)
* Migrate existing zwave_js entities if endpoint has changed

* better function name

* cleanup code

* return as early as we can

* use defaultdict instead of setdefault

* PR comments

* re-add missing logic

* set defaultdict outside of for loop

* additional cleanup

* parametrize tests

* fix reinterview logic

* test that we skip migration when multiple entities are found

* 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-04-13 16:37:55 +02:00
Raman Gupta b98ca49a56
Add min and max temp properties to zwave_js.climate (#49125) 2021-04-12 22:12:38 +02:00
jjlawren dbb771e19c
Check all endpoints for zwave_js.climate hvac_action (#49115) 2021-04-12 12:29:45 -04:00
Raman Gupta 2768f202b6
Check all endpoints for zwave_js.climate fan mode and operating state (#48800)
* Check all endpoints for zwave_js.climate fan mode and operating state

* fix test
2021-04-08 16:53:20 +02:00
Raman Gupta ebb369e008
Add zwave_js WS API command to call node.refresh_info (#48564) 2021-04-02 00:35:13 +02:00
Raman Gupta bc3881db29
Add zwave_js.set_value service (#48487)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-30 11:13:48 +02:00
Raman Gupta 9a75019a65
Add zwave_js.bulk_set_partial_config_parameters service (#48306)
* Add zwave_js.bulk_set_partial_config_parameters service

* update to handle command status

* add test for awake node

* test using a device in service call
2021-03-29 23:07:55 -04:00
Raman Gupta dda9f957b6
Bump zwave-js-server-python to 0.23.0 to support zwave-js 7 (#48094)
* Bump zwave-js-server-python to 0.23.0 and update integration to support schema changes

* refactor notification evenets a bit

* fix tests and bug fixes

* additional changes due to new PR

* add command class and command name

* use new event names so we can retain event property names

* handle command status being returned from async_set_config_parameter

* bump dependency version

* adjust log message to be consistent

* disable pylint warning

* Update homeassistant/components/zwave_js/services.py

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

* add test for awake node

* switch async_get_registry to async_get

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-29 16:28:55 -04:00
Raman Gupta 08db248983
Fallback to current temperature unit for zwave_js climate (#48347)
* Fallback to current temperature unit for zwave_js climate

* don't use unit for N/A setpoint

* update comment

* add tests
2021-03-28 22:18:17 +02:00
Raman Gupta fbc3f97097
Add support for selective config parameter entity discovery (#48336)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-27 18:14:06 +01:00
Raman Gupta 9fca001eed
Bump zwave-js-server-python to 0.22.0 (#48085) 2021-03-18 18:12:33 +01:00
Martin Hjelmare 40c12997ed
Add zwave_js sensor humidity device class (#47953) 2021-03-15 20:51:24 +01:00
Martin Hjelmare c53a462b3d
Fix zwave_js preset mode lookup (#47851) 2021-03-13 22:27:05 +01:00
Raman Gupta c7b9a0715d
Fix zwave_js preset supported feature (#47819) 2021-03-13 12:43:03 +01:00
Charles Garwood 13cd2f52d8
Return property_key in zwave_js get_config_parameters websocket (#47808) 2021-03-12 13:49:59 -05:00
Erik Montnemery b3fecb1c95
Update tests t-z to use async_get() instead of async_get_registry() (#47655) 2021-03-09 14:25:03 +01:00
Raman Gupta 797ee81fc9
Update zwave_js supported features list to be static (#47623) 2021-03-08 15:11:54 -08:00
Raman Gupta 1d387e12cc
Add fallback zwave_js entity name using node ID (#47582)
* add fallback zwave_js entity name using node ID

* add new fixture and test for name that was failing
2021-03-08 09:08:17 +01:00
Martin Hjelmare 0350a6ed21
Only create snapshot if add-on update will be done (#47424) 2021-03-04 16:38:33 -08:00
Raman Gupta ee69e93b46
Bump zwave-js-server-python to 0.21.0 (#47408)
Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com>
2021-03-04 16:15:50 -08:00
Martin Hjelmare 682943511a
Make zwave_js add-on manager more flexible (#47356) 2021-03-04 14:14:24 -08:00
Martin Hjelmare 5ced7395f3
Fix access of missing zwave_js climate unit value (#47380) 2021-03-04 13:11:38 -08:00
Martin Hjelmare d64fe6ea32
Fix zwave_js manual reconfiguration of add-on managed entry (#47364) 2021-03-04 13:11:07 -08:00
Chris 6d478804e7
Add LZW36 device schema to zwave_js discovery (#47314)
* Add LZW26 device schema to discovery

Co-authored-by: @kpine

* Update homeassistant/components/zwave_js/discovery.py

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

* Add tests

* Fix test

Co-authored-by: kpine <keith.pine@gmail.com>
2021-03-04 00:32:37 +01:00
Martin Hjelmare d3721bcf26
Add zwave_js add-on manager (#47251)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-03-02 14:22:42 -08:00
Raman Gupta 42af775f53
Add raw values to zwave_js value notification event (#47258)
* add value_raw to value notification event that always shows the untranslated state value

* add property key and property to event params
2021-03-02 16:10:30 -05:00
Marcel van der Veldt 853d9ac4a9
Update color logic for zwave_js light platform (#47110)
Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
2021-03-01 17:12:49 -08:00
Raman Gupta 3e34bb3e89
Add suggested area for zwave_js devices (#47250) 2021-03-01 15:24:55 -08:00
Charles Garwood d8633f94f6
Guard zwave_js missing nodes in websocket api (#47096) 2021-02-26 16:07:50 +01:00
Paulus Schoutsen 6bd253094f
Bump Z-Wave JS Server Python to 0.20.0 (#47076) 2021-02-25 22:01:08 -08:00
Raman Gupta 7118b7169c
catch ValueError when unique ID update fails because its taken and remove the duplicate entity (#47072) 2021-02-25 20:41:54 -05:00
Raman Gupta a43f3c1a0c
Fix zwave_js unique ID migration logic (#47031) 2021-02-24 23:14:32 -08:00
Marcel van der Veldt 23cbd2dda3
Change Z-Wave JS discovery logic to adopt changes to DeviceClass (#46983)
Co-authored-by: raman325 <7243222+raman325@users.noreply.github.com>
2021-02-24 12:59:06 -08:00
Marcel van der Veldt 868a536d81
Add number platform to Z-Wave JS (#46956)
* add number platform to zwave_js integration
* add discovery scheme for thermostat valve control, using number platform

Co-authored-by: kpine <keith.pine@gmail.com>
2021-02-24 19:39:35 +01:00
Martin Hjelmare db8f597f10
Fix zwave_js config flow server version timeout (#46990) 2021-02-24 16:22:58 +01:00
Raman Gupta 424526db7e
Migrate zwave_js entities to use new unique ID format (#46979)
* migrate zwave_js entities to use new unique ID format

* remove extra param from helper

* add comment to remove migration logic in the future

* update comment

* use instance attribute instead of calling functino on every state update
2021-02-24 09:41:10 -05:00
Marcel van der Veldt d4d68ebc64
Extend zwave_js discovery scheme for lights (#46907) 2021-02-23 16:31:24 -08:00
Raman Gupta b657fd02cd
deep copy zwave_js state in test fixtures so tests are more isolated (#46976) 2021-02-23 18:58:25 -05:00
Raman Gupta 1a99562e91
Add zwave_js.refresh_value service (#46944)
* add poll_value service

* switch vol.All to vol.Schema

* more relevant log message

* switch service name to refresh_value, add parameter to refresh all watched values, fix tests

* rename parameter and create task for polling command so we don't wait for a response

* raise ValueError for unknown entity

* better error message

* fix test
2021-02-23 18:58:04 -05:00
Martin Hjelmare 089effbe3f
Improve zwave_js config flow (#46906) 2021-02-23 13:41:19 -08:00
Raman Gupta 5a3bd30e01
Add zwave_js.set_config_parameter service (#46673)
* create zwave_js.set_config_value service

* update docstring

* PR comments

* make proposed changes

* handle providing a label for the new value

* fix docstring

* use new library function

* config param endpoint is always 0

* corresponding changes from upstream PR

* bug fixes and add tests

* create zwave_js.set_config_value service

* update docstring

* PR comments

* make proposed changes

* handle providing a label for the new value

* fix docstring

* use new library function

* config param endpoint is always 0

* corresponding changes from upstream PR

* bug fixes and add tests

* use lambda to avoid extra function

* add services description file

* bring back the missing selector

* move helper functions to helper file for reuse

* allow target selector for automation editor

* formatting

* fix service schema

* update docstrings

* raise error in service if call to set value is unsuccessful

* Update homeassistant/components/zwave_js/services.yaml

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

* Update homeassistant/components/zwave_js/services.yaml

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

* Update homeassistant/components/zwave_js/services.yaml

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

* Update homeassistant/components/zwave_js/services.yaml

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

* Update homeassistant/components/zwave_js/services.yaml

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

* Update homeassistant/components/zwave_js/services.yaml

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

* remove extra param to vol.Optional

* switch to set over list for nodes

* switch to set over list for nodes

Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-02-23 11:35:11 -05:00
Martin Hjelmare c94968d811
Catch more zwave_js errors (#46957) 2021-02-23 16:36:53 +01:00
Charles Garwood 3c35b6558b
Return states list from zwave_js get_config_parameters websocket if available (#46954) 2021-02-23 09:31:47 -05:00
Raman Gupta 1cecf229b9
Add zwave_js set_config_parameter WS API command (#46910)
* add WS API command

* handle error scenario better

* fixes and remove duplicate catch

* make elif statement more compact

* fix conflict

* switch to str(err)
2021-02-22 20:34:47 -05:00
Raman Gupta 20ccec9aab
Add zwave_js/get_log_config and zwave_js/update_log_config WS API commands (#46601)
* Add zwave_js.update_log_config service

* fix comment

* reduce lines

* move update_log_config from service to ws API call

* fix docstring

* Add zwave_js/get_log_config WS API command

* resolve stale comments

* remove transports since it will be removed from upstream PR

* add support to update all log config parameters since they could be useful outside of the UI for advanced users

* fix comment

* switch to lambda instead of single line validator

* fix rebase

* re-add ATTR_DOMAIN
2021-02-22 18:35:19 -05:00
Charles Garwood 04e07d8b2c
Add get_config_parameters websocket command to zwave_js (#46463)
* Add get_configuration_values websocket command to zwave_js

* Tweak return value

* Review comments and cleanup returned values

* Update test

* Rename to get_config_parameters

* Add get_configuration_values websocket command to zwave_js

* Rename to get_config_parameters

* fix test

* fix tests #2

* Add readable to metadata

Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
2021-02-22 17:03:38 -05:00
kpine fb32c2e3a8
Test zwave_js GE 12730 fan controller device-specific discovery (#46840)
* Add test for GE 12730 fan controller device-specific discovery

* Adjust

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-22 10:56:23 -08:00
kpine 2ae790283c
Detect iBlinds v2.0 switch value as a cover not light (#46807)
* Remove unused "fibaro_fgs222" discovery hint

* Simplify multilevel switch current value discovery schema

* Force iBlinds v2.0 devices to be discovered as cover entities

* Rename discovery test file
2021-02-20 19:52:23 +01:00
Raman Gupta 788134cbc4
Bump zwave-js-server-python to 0.18.0 (#46787)
* updates to support changes in zwave-js-server-python

* bump lib version

* use named arguments for optional args

* re-add lost commits
2021-02-20 09:50:00 +01:00
Raman Gupta 47dcd2bf32
Format zwave_js dump as json (#46792) 2021-02-19 18:44:15 -05:00
Raman Gupta 4d23ffacd1
Add zwave_js thermostat fan mode and fan state support (#46793)
* add thermostat fan mode and fan state support

* return when fan mode is not supported

* use get just in case

* validate state key is in states so we dont have to use get

* pylint
2021-02-20 00:20:10 +01:00
kpine dfa973f9ef
Add barrier covers to zwave_js integration (#46379) 2021-02-14 13:24:29 +01:00
Raman Gupta af4e6f856f
Use better names for zwave_js platforms that are self describing (#46083)
* use better names for platforms that are self describing

* add missing light change

* fix tests

* only use value_name in sensors and binary_sensors
2021-02-06 12:08:25 +01:00
Nathan Spencer 92886cafe9
Fix zwave_js cover control for Up/Down and Open/Close (#45965)
* Fix issue with control of cover when the target value is Up/Down instead of Open/Close

* Adjust open/close/stop cover control to account for no Open/Up or Close/Down targets

* Revert back to using values of 0/99 to close/open a cover since it is supported by all covers

* Replace RELEASE_BUTTON with False and remove unused PRESS_BUTTON in zwave_js cover
2021-02-05 10:48:47 +01:00
Tobias Sauerwein 5615ab4c25
Add support for climate setpoint thermostats to zwave_js (#45890) 2021-02-03 13:59:19 +01:00
Jesse Campbell eaa9fff3ba
Remove v4 multilevel transitional currentValue workaround in zwave_js (#45884)
* Remove v4 multilevel transitional currentValue workaround

This was only needed because the get-after-set was reporting a
transitional currentValue instead of the final one.
zwave-js v6.1.1 removes the get-after-set functionality completely, so
this is no longer required (and breaks status reporting entirely)

* Fix tests to check currentValue instead of targetValue as well
2021-02-03 12:02:49 +01:00
Paulus Schoutsen 40ba182144
Upgrade Z-Wave JS Python to 0.17.0 (#45895) 2021-02-03 11:58:46 +01:00
Martin Hjelmare 524b9e7b1f
Use new zwave_js client (#45872)
* Use new zwave_js client

* Remove client callbacks

* Clean up on connect and on disconnect

* Clean log

* Add stop listen to unsubscribe callbacks

* Fix most tests

* Adapt to new listen interface

* Fix most tests

* Remove stale connection state feature

* Bump zwave-js-server-python to 0.16.0

* Clean up disconnect
2021-02-02 20:59:56 +01:00
Martin Hjelmare 6e205965ee
Fix zwave_js device remove test (#45864) 2021-02-02 15:28:21 +01:00
Raman Gupta a64ad50b27
Remove zwave_js devices that the controller is no longer connected to on initialization (#45853)
* Remove zwave_js devices that the controller is no longer connected to on initialization

* remove extra line break

* fix test

* Clean up

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Lint

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-02-02 10:30:12 +01:00
Marcel van der Veldt 0feda9ce63
Fix sensor discovery for zwave_js integration (#45834)
Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
2021-02-02 10:06:09 +01:00
Raman Gupta 8d9b66e23d
Add current humidity to zwave_js climate platform (#45857) 2021-02-02 09:41:00 +01:00
Raman Gupta 3ef7bd6b73
Add notification events to zwave_js integration (#45827)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-02-02 09:37:42 +01:00
Marcel van der Veldt b4559a172c
Add value notification events to zwave_js integration (#45814) 2021-02-01 23:47:58 +01:00
Raman Gupta 197c857e1f
Search all endpoints for value in zwave_js (#45809)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-01 14:46:06 -05:00
Chris a8cf377ed7
Add stop_cover service for zwave_js (#45805) 2021-02-01 16:46:36 +01:00
Raman Gupta 0b63510cab
Add zwave_js binary sensors property name for Notification CC (#45810) 2021-02-01 09:45:24 +01:00
J. Nick Koston 0693d8a064
Update zwave_js to use new fan entity model (#45543) 2021-01-28 10:15:24 +01:00
Marcel van der Veldt 32c6509d55
Remove unwanted brightness check in zwave_js light (#45597) 2021-01-27 13:07:02 +01:00
Martin Hjelmare f387e833c3
Add zwave_js add-on config flow support (#45552) 2021-01-27 08:56:16 +01:00
Paulus Schoutsen b9a525a9a7
Add an HTTP view to dump the Z-Wave JS state (#45452)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2021-01-26 10:27:20 +01:00
Marcel van der Veldt 11009b99bd
Improve zwave_js light targetvalue vs currentValue selection (#45477) 2021-01-25 22:09:12 +01:00
Ian Tewksbury 666a94a8e1
Add zwave_js ZWavePropertyBinarySensory (#45504) 2021-01-25 15:50:21 +01:00
Paulus Schoutsen bf8d17f1b5
Better wait for Z-Wave to be initialized (#45520) 2021-01-25 13:12:58 +01:00
Raman Gupta c2900ff888
Add support for zwave_js lock services (#45451) 2021-01-23 18:21:31 -05:00
Chris 68e7ecb74b
Add zwave-js fan platform (#45439)
* Add zwave-js fan platform

* Update remaining tests

* Missing awaits, tests fixed

* Fix typing

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-23 00:11:32 +01:00
Chris 198b875a6f
Add cover platform to zwave js (#45193) 2021-01-22 11:51:39 -05:00
Charles Garwood c1addde6f9
Add node_status websocket API command to zwave_js (#45325) 2021-01-19 16:41:24 +01:00
Charles Garwood 8de0b7b948
Add add & remove node commands to zwave_js websocket api (#45232) 2021-01-18 10:08:52 -05:00
Raman Gupta b2f914823d
Add climate platform to zwave_js (#45177)
* add zwave_js support for climate

* fix

* add fixture

* rename fixture

* fix variable name error

* add tests

* fix tests and handle set_temp properly based on unit

* update call being tested

* fix tests

* improve coverage

* fix docstring

* address review comments

* fix test

* update enum class name

* bump zwave-js-server-python version and assume primary_value is always set

* add additional coverage

* fix docstrings and move populating modes/presets into initialization

* attempt to address comments

* improve comment

* move mode value into a variable so its easier to iterate in the future

* dont assume mode as a discovery point

* assume all values are available when node is ready

* fix order of operations

* switch to valueerror

* use primary value

* readd property and type to discovery schema
2021-01-18 03:45:06 +01:00
Raman Gupta 562d30319b
Add lock platform to zwave_js (#45175)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-16 11:43:25 -05:00
Charles Garwood 9dbf14188a
Add WebSocket API Foundation for zwave_js (#45151) 2021-01-15 15:17:40 +01:00
Marcel van der Veldt 071c8cc67d
Add binary_sensor platform to zwave_js (#45081)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-15 09:15:03 -05:00
Paulus Schoutsen 93c2f2bbeb
Bump Z-Wave JS Server Python to 0.9.0 (#45181) 2021-01-15 10:59:35 +01:00
Marcel van der Veldt a276f2d19e
Fix zwave_js adding not fully interviewed nodes (#45162)
* fix situation were nodes are being added or not fully interviewed

* adjust test

* lint
2021-01-15 01:09:03 +01:00
Petro31 3ebc5d45a8
Add energy and power sensor tests & fix device_class (#45122) 2021-01-13 15:37:54 -05:00
Martin Hjelmare 79d37fdf12
Add zwave_js light platform tests (#45107)
* Add bulb 6 multi color device state fixture

* Add light test foundation

* Add no cover comment for todo code

* Update hs_color

* Test turn on light

* Test light turn off

* Fix brightness comparison

* Test setting same brightness

* Test setting same rgb color

* Test color temp update

* Test setting same color temp

* Add entity module to coverage calculation

* Fix typing
2021-01-13 16:28:51 +01:00
Charles Garwood be2aba6c52
Fix docstring in zwave_js switch test (#45076) 2021-01-12 14:29:12 +01:00
Charles Garwood f312b87a3f
Add switch platform to zwave_js (#45046) 2021-01-11 18:40:39 -05:00
Martin Hjelmare d270f9515b
Add zwave_js init module tests (#45048)
* Add entry setup and unload test

* Test home assistant stop

* Test on connect and on disconnect

* Test client connect timeout

* Test ready node added

* Test non ready node added

* Test existing node not ready

* Test device registry state

* Add common test tools module

* Add existing ready node test

* Include init module in coverage calculation

* Clean docstrings
2021-01-11 16:05:11 +01:00
Charles Garwood d68fdbc283
Add zwave_js integration (#45020)
* Run zwave_js scaffold (#44891)

* Add zwave_js basic connection to zwave server (#44904)

* add the basic connection to zwave server

* fix name

* Fix requirements

* Fix things

* Version bump dep to 0.1.2

* fix pylint

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Bump zwave-js-server-python to 0.2.0

* Use zwave js server version check instead of fetching full state (#44943)

* Use version check instead of fetching full state

* Fix tests

* Use 0.3.0

* Also catch aiohttp client errors

* Update docstring

* Lint

* Unignore zwave_js

* Add zwave_js entity discovery basics and sensor platform (#44927)

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

* Complete zwave_js typing (#44960)

* Type discovery

* Type init

* Type entity

* Type config flow

* Type sensor

* Require typing of zwave_js

* Complete zwave_js config flow test coverage (#44955)

* Correct zwave_js sensor device class (#44968)

* Fix zwave_js KeyError on entry setup timeout (#44966)

* Bump zwave-js-server-python to 0.5.0 (#44975)

* Remove stale callback signal from zwave_js (#44994)

* Add light platform to zwave_js integration (#44974)

* add light platform

* styling fix

* fix type hint

* Fix typing

* Update homeassistant/components/zwave_js/const.py

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

* Update homeassistant/components/zwave_js/entity.py

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

* Update homeassistant/components/zwave_js/entity.py

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

* Update homeassistant/components/zwave_js/entity.py

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

* Update homeassistant/components/zwave_js/entity.py

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

* Update homeassistant/components/zwave_js/entity.py

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

* color temp should be integer

* guard Nonetype error

* 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>

* some fixes after merging

* add additional guards for None values

* adjustments for rgb lights

* Fix typing

* Fix black

* Bump zwave-js-server-python to 0.6.0

* guard value updated log

* remove value_id lookup as its no longer needed

* fiz sending white value

* Update homeassistant/components/zwave_js/light.py

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

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

* Add zwave_js test foundation (#44983)

* Exclude text files from codespell

* Add basic dump fixture

* Add test foundation

* Fix test after rebase

* Exclude jsonl files from codespell

* Rename fixture file type to jsonl

* Update fixture path

* Fix stale docstring

* Add controller state json fixture

* Add multisensor 6 state json fixture

* Update fixtures

* Remove basic dump fixture

* Fix fixtures after library bump

* Update codeowner

* Minor cleanup Z-Wave JS (#45021)

* Update zwave_js device_info (#45023)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-01-11 00:08:25 +01:00