Commit graph

381 commits

Author SHA1 Message Date
Jeff Grieger
47a2d5b472
Add zwave_js speed config for additional GE/Jasco fan controllers ()
* Add zwave_js speed config for additional GE/Jasco fan controllers

Add speed info for Honeywell(GE/Jasco) 39358 In-Wall Fan Speed Control and Enbrighten(GE/Jasco) 55258 In-Wall Fan Speed Control.

* Add test for Honeywell 39358 In-Wall Fan Speed Control
2023-06-01 00:09:35 +02:00
Raman Gupta
bd8c88f51b
Add error handling for all zwave_js service calls ()
* Add error handling for all service calls

* Switch siren to use internal function

* Remove failing checks

* Revert change to poll service, add comments, and add additional error handling

* Add error handling for ping and refresh + review comment + add tests

* Add test for statistics entity refresh
2023-05-31 11:09:01 -04:00
Raman Gupta
b3990d48d2
Improve Z-Wave support for Ultraviolet multilevel sensor values ()
Improve support for Ultraviolet multilevel sensor values
2023-05-31 13:31:02 +02:00
Raman Gupta
1eb1ea08b0
Add support for Energy Production CC sensors () 2023-05-31 13:28:07 +02:00
Raman Gupta
204215e0f2
Cleanup unnecessary pylance warnings () 2023-05-31 10:15:21 +02:00
Raman Gupta
4119d3198a
Support zwave config parameters not on endpoint 0 ()
* Support zwave config parameters not on endpoint 0

* Update device automation logic

* Make endpoint required

* Update homeassistant/components/zwave_js/services.py

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

* Update homeassistant/components/zwave_js/services.py

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-05-30 23:52:12 -04:00
Raman Gupta
8cd8355ab1
Bump zwave-js-server-python to 0.49.0 ()
* Bump zwave-js-server-python to 0.49.0

* fix tests
2023-05-30 22:40:55 -04:00
Raman Gupta
05c3d8bb37
Add zwave_js node statistics sensors ()
* Add node statistics sensors

* fix tests and don't let controller state leak across tests

* Add background RSSI

* Remove extra logging statement

* fix test

* comments

* setup platform once

* Add static properties to entity description

* Update homeassistant/components/zwave_js/sensor.py

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

* don't dupe attribute values in entity description

* fix exception

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-05-30 20:44:32 +02:00
Raman Gupta
65187c6f11
Add zwave config parameter entities ()
* Add zwave config parameter entities

* Remove unused entity const

* remove unusued imports

* review comments

* switch to reserved values

* fix test
2023-05-30 11:49:55 -04:00
Raman Gupta
90bf5429ca
Add support for Window Covering CC ()
* Refactor zwave_js.cover and improve test coverage

* Remove extra fixtures

* cleanup old stuff

* Get coverage to 100

* Add support for Window Covering CC

* fix bug

* typo

* remove redundant stuff

* slight change to improve readability

* Add device class

* Update to match specs
2023-05-30 11:26:23 -04:00
Raman Gupta
3e84c374f4
Improve zwave.cover tests ()
* Improve zwave.cover tests

* Update conftest.py
2023-05-24 18:51:15 +02:00
Raman Gupta
872cd47e87
Add proper support for zwave_js Indicator CC ()
* Add proper support for zwave_js Indicator CC

* remove stale test

* Make all indicators diagnostic

* only set entity category if it is specified

* Only set properties from discovery if specified

* Conditionally set assumed state as well

* fix const name

* Don't create task

* Disable property keys 3-5 by default

* add additional dispatcher_connects so we catch all signals

* be consistent about order

* rename new discovery parameter

* comment

* exclude property keys 3-5

* fix remove logic

* add comment so I don't forget

* Switch entity category to config where necessary

* cut line

* less lines

* Update homeassistant/components/zwave_js/switch.py

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

* Move async_remove to respond to interview started event

* Set up listener immediately so we don't wait for platform creation

* remove dupe import

* black

* append

---------

Co-authored-by: kpine <keith.pine@gmail.com>
2023-05-24 09:09:38 -04:00
Raman Gupta
66f7218b68
Do optimistic state update for Z-Wave multilevel switch entities ()
* Do optimistic state update for Z-Wave multilevel switch entities

* simplify

* define constant for setting value to previous value

* Rework to only consider value of 255 and only places where we know that the previous state is known by the integration due to the service being called

* missed commit

* better code

* Add tests and use constant from lib

* fix logic

* fix bug

* Add comments with more details
2023-05-24 09:04:11 -04:00
Raman Gupta
3e93dd6a01
Update name for Notification CC sensors and buttons ()
* Update name for Notification CC sensors and buttons

* Add comment with reference to names
2023-05-24 09:00:37 -04:00
Raman Gupta
3bf9eaffdf
Bugfix and add test coverage for zwave_js.light ()
Add test coverage for zwave_js.light
2023-05-22 12:08:29 -04:00
Raman Gupta
18eeeaaf68
Refactor zwave_js.fan and add tests ()
* Refactor zwave_js.fan and add tests

* fix const
2023-05-22 12:08:13 -04:00
Raman Gupta
e1dd7118e0
Refactor zwave_js.sensor and add test coverage ()
* Refactor zwave_js.sensor and add test coverage

* use walrus

* inherit config parameter class from list class

* use walrus in more places

* improve config parameter test
2023-05-22 11:58:10 -04:00
Raman Gupta
d6997d8656
Improve test coverage for zwave_js.trigger ()
Improve coverage for zwave_js.trigger
2023-05-22 17:55:03 +02:00
Raman Gupta
ec12d9a197
Improve test coverage for zwave_js () 2023-05-22 12:20:01 +02:00
Raman Gupta
3190e5d7cf
Add button entities to manually idle zwave notification values ()
* Add button entities to manually idle zwave notification values

* Update discovery.py

* Improve discovery check

* fix tests

* make unique ID more clear
2023-04-25 21:41:29 -04:00
Raman Gupta
78a49ecbce
Bump zwave-js-server-python to 0.48.0 ()
* Bump zwave-js-server-python to 0.48.0

* Add handling of FailedZWaveCommand exception

* Reset mock to avoid unintentional side effects

* Fix bump
2023-04-25 15:41:37 -04:00
Erik Montnemery
63f3767a29
Include UUID in hassio discovery data () 2023-04-25 09:48:47 +02:00
Raman Gupta
c51ed4b328
Redact secret zwave values in diagnostics ()
* redact secret zwave values from diagnostics

* shhrink

* rename
2023-03-28 09:59:01 +02:00
Raman Gupta
c11a3881af
Bump zwave-js-server-python to 0.47.0 () 2023-03-27 12:25:04 +02:00
Raman Gupta
cbe85126cb
Introduce a delay between update entity calls ()
* Introduce a delay between update entity calls

* Update homeassistant/components/zwave_js/update.py

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

* move delay to constant and patch

* rename constant

* Switch to async_call_later

* Remove failing test

* Reimplement to solve task problem

* comment

* pass count directly so that value doesn't mutate before we store it

* lines

* Fix logic and tests

* Comments

* Readd missed coverage

* Add test for delays

* cleanup

* Fix async_added_to_hass logic

* flip conditional

* Store firmware info in extra data so we can restore it along with latest version

* Comment

* comment

* Add test for is_running check and fix bugs

* comment

* Add tests for various restore state scenarios

* move comment so it's less confusing

* improve typing

* consolidate into constant and remove unused one

* Update update.py

* update test to unknown state during partial restore

* fix elif check

* Fix type

* clean up test docstrings and function names

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-03-20 18:30:56 -04:00
epenet
a0f725dfcb
Add type hints to tests () 2023-03-10 12:06:50 +01:00
epenet
9762b684c2
Adjust entity registry access in tests (3) () 2023-03-01 16:04:40 +01:00
Marius Stedjan
9fc6700c5a
Add ZWaveDiscoverySchema for Merten 507801 ()
* Add ZWaveDiscoverySchema for Merten 507801

* Add discovery tests to Merten 507801 z-wave device

* Add Z-Wave discovery schemas for Merten 507801 to disable endpoint 2 by default

* Add more discovery tests for Merten 507801 z-wave device
2023-03-01 00:47:47 -05:00
Raman Gupta
5739782877
Add support for firmware target in zwave_js FirmwareUploadView ()
* Add support for firmware target in zwave_js FirmwareUploadView

fix

* Update tests/components/zwave_js/test_api.py

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

* Update tests/components/zwave_js/test_api.py

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

* Update tests/components/zwave_js/test_api.py

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

* Update tests/components/zwave_js/test_api.py

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

* fix types

* Switch back to using Any

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-02-23 13:24:55 -05:00
Raman Gupta
05a7df5629
Add controller support to zwave_js/subscribe_firmware_update_status () 2023-02-22 12:08:57 -05:00
Raman Gupta
cab8a59be4
Add dsk option to zwave_js/add_node WS command ()
* Add dsk option to zwave_js/add_node WS command

* Bump zwave-js-server-python to 0.46.0 ()

* fix tests
2023-02-22 11:53:22 -05:00
Raman Gupta
1f9f6ab1f0
Update zwave_js FirmwareUploadView to support controller updates ()
* Update zwave_js FirmwareUploadView to support controller updates

* Add coverage

* Change None check to assertion
2023-02-22 11:52:00 -05:00
Raman Gupta
5683d21931
Add new zwave_js WS command to parse DSK from QR code ()
* Add new zwave_js WS command to parse DSK from QR code

* remove minimum character check since it is not needed in this case
2023-02-22 11:51:40 -05:00
Raman Gupta
8722f5b42b
Bump zwave-js-server-python to 0.46.0 () 2023-02-21 07:15:55 +01:00
epenet
1128041899
Add type hints to integration tests (zwave_js) () 2023-02-18 14:59:26 +01:00
Franck Nijhof
1e05697080
Enable Ruff B007 ()
* Enable Ruff B007

* Adjust existing cases
2023-02-17 21:08:18 -05:00
Franck Nijhof
d3ed8de232
Update Ruff to v0.0.247 ()
* Update Ruff to v0.0.247

* Fix new found violations
2023-02-15 16:46:03 -05:00
Franck Nijhof
ed79265843
Enable Ruff PT006 ()
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
Raman Gupta
8aa64c8008
Add has_firmware_update_cc bool to zwave_js/node_status cmd ()
* Add `has_firmware_update_cc` bool to zwave_js/node_status cmd

* fix test

* Switch order of equality check
2023-02-10 00:49:09 -05:00
Erik Montnemery
cc564026fa
Move EntityCategory to homeassistant.const ()
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
epenet
278050a73f
Add type hints to integration tests (t-z) () 2023-02-08 19:10:53 +01:00
epenet
4142f0d15d
Add return type to tests without arguments ()
* Add return type to tests without arguments

* Black

* Cancel fixture amends
2023-02-07 14:20:06 +01:00
epenet
aa00114c2f
Add return type to async tests without arguments () 2023-02-07 10:26:56 +01:00
Raman Gupta
86cef27e1c
Rename zwave_js ws API command () 2023-02-03 15:26:20 -05:00
Raman Gupta
c715534821
Bump zwave-js-server-python to 0.45.0 () 2023-01-30 14:27:37 -05:00
Franck Nijhof
57cf11f067
Enable Ruff PT015 () 2023-01-27 11:10:29 +01:00
Franck Nijhof
e50a531cd9
Code styling tweaks to the tests - Part 2 ()
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2023-01-26 01:23:53 +01:00
epenet
aa5b29c560
Adjust zwave_js diagnostics () 2023-01-09 14:33:09 +01:00
Martin Hjelmare
439b35c310
Fix Z-Wave JS sensor units and device classes ()
fixes undefined
2023-01-04 19:47:10 +01:00
Martin Hjelmare
94b80db968
Handle not available add-on in hassio add-on manager ()
* Handle not available add-on in hassio add-on manager

* Fix zwave_js tests

* Fix sky connect tests

* Fix matter tests

* Fix yellow tests

* Update hardware tests
2023-01-02 20:28:21 -05:00