549 Commits

Author SHA1 Message Date
Martin Hjelmare
86ff540db9
Patch Z-Wave platforms in custom event tests (#141268)
Patch Z-Wave platforms in custom events tests
2025-03-24 12:19:29 +01:00
Martin Hjelmare
fdaba003ce
Patch Z-Wave platforms in event tests (#141209) 2025-03-23 16:22:18 +02:00
Martin Hjelmare
588d6ad4cf
Patch Z-Wave platforms in cover tests (#141205) 2025-03-23 15:35:29 +02:00
Martin Hjelmare
34504f45a5
Patch Z-Wave platforms in climate tests (#141204) 2025-03-23 15:15:09 +02:00
Martin Hjelmare
a835c85f59
Patch Z-Wave platforms in button tests (#141001) 2025-03-20 16:37:02 +02:00
Martin Hjelmare
5f84fc3ee5
Patch Z-Wave platforms in binary sensor tests (#140992) 2025-03-20 16:06:21 +02:00
Martin Hjelmare
df0125abdd
Patch Z-Wave platforms in api tests (#140988) 2025-03-20 12:54:40 +01:00
Martin Hjelmare
d8a4a97ee0
Allow patching Z-Wave platforms specifically in tests (#140987) 2025-03-20 12:19:14 +01:00
Petar Petrov
3fb0290fba
Remove unused params in "zwave_js/provision_smart_start_node" API (#140982) 2025-03-20 10:19:26 +01:00
Martin Hjelmare
2674b02bfa
Refactor zwave_js config entry setup (#107635)
* Refactor zwave_js config entry setup

* Fix blocking update test

* Address timeout comment

* Remove platform tasks

* Replace deprecated async_add_job

* Use ConfigEntry.async_on_state_change

* Use modern config entry methods

* Clarify exception message

* Test listen error after config entry setup

* Test listen failure during setup after forward entry

* Test not reloading when hass is stopping

* Test client disconnect is called on entry unload

* Fix and test client not connected during driver setup

* Fix and test driver ready timeout

* Stringify listen task exception when logging

* Use identity compare

* Guard for closed connection

* Consolidate listen task checking and tests
2025-03-20 10:16:48 +01:00
Petar Petrov
516aaa741d
Add Z-Wave JS lookup_device API (#140802)
* ZwaveJS lookup_device API

* add FailedCommand test

* test tweak
2025-03-18 12:05:10 +01:00
Petar Petrov
de0efd61d1
Add Z-Wave JS NVM backup and restore API (#139233)
* ZWaveJS: NVM backup and restore API

* remove unused const

* test fix

* switch to WS commands

* Backup & restore MVP

* Use base64 data directly

* update tests

* fix mistake

* Apply suggestions from code review

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

* PR comments

* update tests

* more tests

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-03-14 15:17:23 +01:00
Petar Petrov
ae8709be21
Expose ZWaveJSsupports_long_range to the frontend (#140489)
* Expose ZWaveJS`supports_long_range` to the frontend

* update test
2025-03-14 12:19:49 +01:00
Erik Montnemery
51c09c2aa4
Add test fixture ignore_translations_for_mock_domains (#139235)
* Add test fixture ignore_translations_for_mock_domains

* Fix fixture

* Avoid unnecessary attempt to get integration

* Really fix fixture

* Add forgotten parameter

* Address review comment
2025-02-25 20:10:29 +01:00
Petar Petrov
a003f89a5e
Fix Z-WaveJS inclusion in the background (#138717)
* Fix Z-WaveJS inclusion in the background

* improve async handling

* just return the `requested_grant` to the driver

* handle controller busy state
2025-02-18 15:17:13 +01:00
Erik Montnemery
e0795e6d07
Improve config entry state transitions when unloading and removing entries (#138522)
* Improve config entry state transitions when unloading and removing entries

* Update integrations which check for a single loaded entry

* Update tests checking state after unload fails

* Update homeassistant/config_entries.py

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-17 18:16:57 +01:00
Erik Montnemery
78337a6846
Disable zwave_js testing resetting the controller (#138595)
* Improve zwave_js test of resetting the controller

* Disable the test
2025-02-15 20:16:07 +01:00
epenet
b43379be7d
Standardize helpers.xxx_registry imports (#136688)
Standardize registry imports
2025-01-28 08:48:34 +01:00
Marc Mueller
8a3ef101e6
Replace additional deprecated USBServiceInfo imports (#135953) 2025-01-18 17:43:07 -06:00
epenet
b046ca9abe
Move ZeroconfServiceInfo to service_info helpers (#135653)
* Move ZeroconfServiceInfo to service_info helpers

* Adjust deprecation date

* Fix mypy/pylint

* Fix DeprecatedConstant

* Add deprecation test

* Adjust

* Also deprecate ATTR_PROPERTIES_ID
2025-01-15 12:25:42 +01:00
Joost Lekkerkerker
8db63adc11
Bump ruff to 0.9.1 (#135197) 2025-01-14 11:46:12 +01:00
epenet
e276f8ee89
Migrate zwave_js light tests to use Kelvin (#133034) 2024-12-12 20:32:39 +01:00
Petar Petrov
30f84f55a4
Handle Z-Wave JS S2 inclusion via Inclusion Controller (#132073)
* ZwaveJS: Handle S2 inclusion via Inclusion Controller

* improved tests
2024-12-06 09:35:48 +01:00
Petar Petrov
3a19c2f47f
Support Z-Wave JS abort S2 bootstrapping (#132140)
ZWaveJS: abort S2 bootstrapping when inclusion is canceled
2024-12-03 13:29:44 +01:00
Petar Petrov
29b48d02de
Bump zwave-js-server-python to 0.60.0 (#132059) 2024-12-02 13:21:54 +01:00
Petar Petrov
061c19fbf8
Add Z-Wave installer_mode yaml option (#129888)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-11-20 12:04:29 +01:00
epenet
3c3a6dff04
Add translation checks for issue registry (#130593) 2024-11-15 15:05:04 +01:00
Petar Petrov
3eab0b704e
Get/Set custom config parameter for zwave_js node (#129332)
* Get/Set custom config parameter for zwave_js node

* add tests

* handle errors on set

* test FailedCommand
2024-11-08 15:12:18 +01:00
Petar Petrov
cb97f2f13c
Bump zwave-js-server-python to 0.59.0 (#129482) 2024-11-07 10:06:28 +01:00
Robert Resch
5900413c08
Add zwave_js node_capabilities and invoke_cc_api websocket commands (#125327)
* Add zwave_js node_capabilities and invoke_cc_api websocket commands

* Map isSecure to is_secure

* Add tests

* Add error handling

* fix

* Use to_dict function

* Make response compatible with current expectations

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-11-01 00:32:01 +01:00
Robert Resch
380974eed4
Remove hassio from ALLOWED_USED_COMPONENTS and move some functions to helper (#127228)
* Remove hassio from ALLOWED_USED_COMPONENTS

* Move HassioServiceInfo to helpers.service_info

* Deprecate moved functions

* Add note about deprecation

* Fix tests

* Implement suggestion

* Typo

* Update pyproject.toml

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-10-30 12:43:41 +01:00
Mike Degatano
673f0224c9
Continue migration of methods from handler to aiohasupervisor (#129183) 2024-10-29 14:33:21 +01:00
Petar Petrov
47bf0ebb47
Resume adding Z-Wave device if the page is refreshed (#129081)
* ZwaveJS: Resume adding a device if the page is refreshed

* add test

* address PR comments
2024-10-25 11:08:07 +02:00
Mike Degatano
ad55c9cc19
Remaining addon management to aiohasupervisor (#128484)
* Move set addon options to aiohasupervisor

* addon stats to aiohasupervisor and test fixes

* addon changelogs to aiohasupervisor

* Raise correct error for library in tests

* Cache client in instance property

* Use singleton method rather then HassIO instance method

* Mock supervisor client in more tests
2024-10-21 16:41:00 +02:00
Erik Montnemery
e861cab727
Add update_percentage state attribute to update entity (#128877)
* Add update_percentage state attribute to update entity

* Update tests

* Update tests
2024-10-21 15:31:48 +02:00
Petar Petrov
106746ce58
Include Z-Wave JS lowSecurityReason in node added websocket message (#128896)
* Propagate lowSecurityReason to FE when adding a zwavejs device insecurely

* update tests
2024-10-21 14:27:04 +02:00
Petar Petrov
8533f853c8
Increase Z-Wave fallback thermostat range to 0-50 C (#128543)
* Z-Wave JS: Increase fallback thermostat range to 0-50 C

* update test
2024-10-17 12:41:23 +02:00
AlCalzone
f446e42317
Support non-dimmable color lights in Z-Wave JS (#127808)
* Z-Wave JS: support non-dimmable color lights

* remove black_is_off light, support on/off/color

* fix: tests for on/off light

* fix: typo

* remove commented out old test code

* add test for off and on

* support colored lights without separate brightness control

* add test for color-only light

* refactor: extract color only light

* fix: preserve color when changing brightness

* extend tests

* refactor again

* refactor scale check

* refactor: remove impossible check

* review feedback

* review feedback

* fix discovery to handle all 3 switch CCs, limit search to same endpoint

* Update homeassistant/components/zwave_js/discovery.py

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

* Update homeassistant/components/zwave_js/discovery.py

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

* add test for Smart Switch 7 state

* Add type annotations

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-10-10 14:36:37 +02:00
Mike Degatano
a9aa5ad229
Use aiohasupervisor for store APIs (#126780)
* Use aiohasupervosor for store addon info

* Use aiohasupervisor install addon

* Use aiohasupervisor for store info API

* Fix onboarding test

* Changes from feedback

* Move get_supervisor_client out of constructor

* Mock supervisor_client in tests

* Make property private
2024-10-10 10:27:20 +02:00
Raman Gupta
2dec36f210
Fix zwave_js config validation for values (#127972) 2024-10-09 07:35:41 +02:00
G Johansson
666e8e133e
Cover state is enum (#127144)
* Change light state to use enum

* Adjust cover tests

* Update cover

* Fix covers

* Some tests

* More tests

* Fix tests

* Fix
2024-10-08 18:39:04 +02:00
Martin Hjelmare
e3e68dad36
Revert "Support Z-Wave JS dimming lights using color intensity (#122639)" (#127256)
This reverts commit c7cfd56b720be8212af2686ecfa5b8cad6ee299b.
2024-10-02 06:48:47 +02:00
Martin Hjelmare
bb70a0feb2
Fix Z-Wave rediscovery (#127213) 2024-10-01 14:42:31 +02:00
Martin Hjelmare
0a99c1c633
Bump zwave-js-server-python to 0.58.1 (#127114)
* Bump zwave-js-server-python to 0.58.1

* Update tests
2024-09-30 18:35:14 +02:00
Joost Lekkerkerker
bebd1dc235
Enable Zwave notification sensors by default (#125326)
* Enable Zwave notification sensors by default

* Enable Zwave notification sensors by default

* Enable Zwave notification sensors by default

* Enable Zwave notification sensors by default

* Enable Zwave notification sensors by default

* Enable Zwave notification sensors by default

* Enable Zwave notification sensors by default

* Enable Zwave notification sensors by default

* Fix the check to (dis)allow discovering a value multiple times

* Prevent discovery of duplicate Notification CC sensors

* alarm sensors disabled by default

* one more fix

* Update diagnostics tests

---------

Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-09-25 11:53:42 +02:00
Mike Degatano
7517948900
Replace more addon management with aiohasupervisor (#126236)
* Replace start_addon with library call

* restart_addon to library and error issues in tests

* stop_addon to library

* uninstall_addon to library

* Add output typing

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-09-24 15:47:29 +02:00
G Johansson
93aade6e8e
Change lock state to an enum (#126379)
* Add new LockState enum for lock states

* Add rest

* Fix insteon tests

* Fix mqtt tests

* Fix tesla_fleet

* Revert back ST_STATE_LOCKED

* Add back constant
2024-09-24 12:30:50 +02:00
Marcel van der Veldt
1dd1de2636
Pass default value in Z-Wave websocket handler for configuration values (#125343)
* Pass default value in zwave websocket handler for configuration values

* Update test

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-09-19 10:07:28 +02:00
Mike Degatano
97d0d91d2c
Use aiohasupervisor for addon info calls (#125926)
* Use aiohasupervisor for addon info calls

* Fix issue/repair tests in supervisor

* Fixes from feedback
2024-09-17 23:22:35 +02:00
AlCalzone
c77a3674b0
Cleanup zwave_js fixture definitions (#125896)
* refactor: cleanup zwave_js fixture definitions

* fix: that one fixture that's not an object

* fix: some more forgotten ones
2024-09-16 10:22:04 +02:00