Commit graph

130 commits

Author SHA1 Message Date
Martin Hjelmare
0e5040d917
Add zwave_js options flow to reconfigure server () 2021-06-24 13:15:42 +02:00
Raman Gupta
0eae0cca2b
Move zwave_js migration tests into new module () 2021-06-21 20:42:03 -04:00
Raman Gupta
8a9a141f3c
Fix zwave_js migration logic ()
* 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 () 2021-06-17 17:19:25 +02:00
Raman Gupta
a250343c55
Support bitmask as a value ()
* 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 ()
* 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 ()
* 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 () 2021-06-02 21:07:47 -07:00
Raman Gupta
a8650f4e59
Add zwave_js node status sensor ()
* 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 ()
* 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 ()
* 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 () 2021-05-26 08:39:08 -07:00
Raman Gupta
6d9b67ddb2
Add zwave_js heal node and network WS API commands ()
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 ()
* 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 ()
* 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 

* 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 () 2021-05-25 08:48:21 -07:00
Raman Gupta
4875035ff8
Add zwave_js WS API commands for node ping and metadata () 2021-05-25 17:37:12 +02:00
Martin Hjelmare
9319fc6263
Update zwave_js stored add-on options ()
* 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 () 2021-05-25 13:40:22 +02:00
Raman Gupta
ebf6e3d985
Add zwave_js WS API commands to replace and remove failed nodes ()
* 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 () 2021-05-21 13:47:37 +02:00
Ville Skyttä
19d25cd901
Change config entry state to an enum ()
* 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 ()
* 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 ()
* 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 ()
* 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 () 2021-05-06 17:59:03 -07:00
Martin Hjelmare
38d7652176
Fix zwave_js websocket api KeyError on unloaded entry () 2021-05-06 16:43:14 +02:00
Raman Gupta
fdc29d6a80
Add device specific discovery for Heatit Z-TRM3 thermostat ()
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 () 2021-04-30 13:46:25 +02:00
Franck Nijhof
c68b259bd3
Cleanup of unused connection_class logic ()
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 () 2021-04-28 09:23:48 -07:00
Raman Gupta
795fe18a90
Add additional zwave_js WS API commands for nodes ()
* 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 ()
* 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 ()
* 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 ()
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 ()
* 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 ()
* 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 () 2021-04-20 21:40:54 -04:00
Raman Gupta
cf16e651cf
Bump zwave_js dependency to 0.24.0 ()
* 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 ()
* 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 () 2021-04-12 22:12:38 +02:00
jjlawren
dbb771e19c
Check all endpoints for zwave_js.climate hvac_action () 2021-04-12 12:29:45 -04:00
Raman Gupta
2768f202b6
Check all endpoints for zwave_js.climate fan mode and operating state ()
* 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 () 2021-04-02 00:35:13 +02:00
Raman Gupta
bc3881db29
Add zwave_js.set_value service ()
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 ()
* 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 ()
* 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 ()
* 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 ()
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 () 2021-03-18 18:12:33 +01:00