Commit graph

943 commits

Author SHA1 Message Date
Martin Hjelmare
e3e68dad36
Revert "Support Z-Wave JS dimming lights using color intensity (#122639)" (#127256)
This reverts commit c7cfd56b72.
2024-10-02 06:48:47 +02:00
Martin Hjelmare
bb70a0feb2
Fix Z-Wave rediscovery (#127213) 2024-10-01 14:42:31 +02:00
epenet
0d9f2aee70
Fix incorrect type hint in zwave_js config flow (#127158) 2024-10-01 10:20:01 +02:00
epenet
dcb6c9a133
Adjust type hints in zwave_js config flow (#127104) 2024-09-30 21:42:16 +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
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
Martin Hjelmare
c7e9096dfd
Bump zwave-js-server-python to 0.58.0 (#125666)
* Bump zwave-js-server-python to 0.58.0

* Update lock test
2024-09-13 13:22:37 +02:00
AlCalzone
3eaa005c7e
Use start/stop level change to open/close Z-Wave JS Window Covering CC covers (#125827)
* Z-Wave JS: Use start/stop level change to open/close Window Covering CC covers

* fix: import

* Update tests/components/zwave_js/test_cover.py

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

* assert that up_value and down_value exist

* fix: forgot one

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-09-13 12:41:13 +02:00
epenet
d530fd31b0
Use root import for async_redact_data in diagnostics (#125821) 2024-09-12 20:37:00 +02:00
epenet
6ef1dd56f5
Use root import for device_automation (#125836) 2024-09-12 17:01:25 +02:00
Raman Gupta
7788685340
Get zwave_js statistics data from model (#120281)
* Get zwave_js statistics data from model

* Add migration logic

* Update comment

* revert change to forward entry
2024-09-04 08:16:56 +02:00
Martin Hjelmare
7c15075231
Clean up Z-wave error log when raising in service handlers (#125138) 2024-09-03 15:49:11 +02:00
AlCalzone
c7cfd56b72
Support Z-Wave JS dimming lights using color intensity (#122639)
* 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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-08-29 00:01:53 +02:00
Erik Montnemery
38ef216894
Update icons.json to new service schema part 4 (#124771) 2024-08-28 13:48:13 +02:00
epenet
0dc1eb8757
Cleanup unused import in zwave_js config flow (#124716) 2024-08-27 18:41:27 +02:00
epenet
831a1d7ad1
Standardize import step variable name (part 1) (#124674) 2024-08-27 10:34:47 +02:00
Raman Gupta
7c6e3fe9c4
Fix zwave_js services.yaml schema (#124455)
Fix zwave_Js services.yaml schema
2024-08-23 08:38:08 +02:00
Raman Gupta
fc1ed7d7cb
Refactor targets for zwave_js services (#115734)
* Let labels be used as targets for zwave_js services

* add coverage

* Fix test bug and switch from targets to fields

* Remove label addition

* Remove labels from service descriptions

* Remove labels from strings

* More changes
2024-08-22 21:07:21 +02:00
Alexander Schneider
9a3c7111f7
Add Z-Wave discovery schema for ZVIDAR roller shades (#122332)
Add discovery schema for ZVIDAR roller shades
2024-07-21 23:51:10 +02:00
Sid
4620a54582
Bump Ruff to 0.5.3 (#122167) 2024-07-19 12:06:53 +02:00
G Johansson
ca4c617d4b
Add TURN_OFF/TURN_ON feature flags for fan (#121447) 2024-07-19 11:35:24 +02:00
Franck Nijhof
a9bf12f102
Rename Services to Actions in translation strings (#121777) 2024-07-15 21:19:25 +02:00
Marc Mueller
ca55986057
Import Generator from collections.abc (1) (#120914) 2024-07-01 11:51:51 +02:00
Joost Lekkerkerker
1fdd056c0e
Fix ruff manual-dict-comprehension PERF403 (#120723)
* Fix PERF403

* Fix

* Fix
2024-06-28 14:17:47 +02:00
Marc Mueller
d527113d59
Improve schema typing (3) (#120521) 2024-06-26 11:30:07 +02:00
Marc Mueller
49df0c4366
Improve schema typing (2) (#120475) 2024-06-26 02:25:30 +02:00
Marc Mueller
bcd1243686
Use VolDictType to improve schema typing (#120417) 2024-06-25 15:15:59 +02:00
Raman Gupta
6a5c1fc613
Replace custom validator from zwave_js with from_dict funcs (#120279) 2024-06-24 08:43:13 +02:00
Raman Gupta
d9e26077c6
Add discovery rule for a Z-Wave Basic CC sensor (#105134) 2024-06-22 11:22:32 +02:00
AlCalzone
a1884ed821
Add discovery for Z-Wave Meter Reset (#119968) 2024-06-21 18:39:22 +02:00
Raman Gupta
3a8b0c3573
Bump zwave-js-server-python to 0.57.0 (#120047) 2024-06-21 09:29:10 +02:00
Franck Nijhof
b419ca2241
Register Z-Wave services on integration setup (#119924) 2024-06-18 22:27:52 +02:00
J. Nick Koston
dbd3147c9b
Remove async_late_forward_entry_setups and instead implicitly hold the lock (#119088)
* Refactor config entry forwards to implictly obtain the lock instead of explictly

This is a bit of a tradeoff to not need async_late_forward_entry_setups

The downside is we can no longer detect non-awaited plastform setups
as we will always implicitly obtain the lock instead of explictly.

Note, this PR is incomplete and is only for discussion purposes
at this point

* preen

* cover

* cover

* restore check for non-awaited platform setup

* cleanup

* fix missing word

* make non-awaited test safer
2024-06-12 21:06:11 -04:00
Matthias Alphart
39f3a294dc
Device automation extra fields translation for Z-Wave-JS (#119529) 2024-06-12 22:44:50 +02:00
AlCalzone
8ca0de1d20
Forward Z-Wave JS node found event to frontend (#118866)
* forward Z-Wave `node found` event to frontend

* add tests
2024-06-12 13:48:47 +02:00
Raman Gupta
2c41451abc
Add new security keys to zwave_js config flow (#115835) 2024-06-08 11:31:05 -04:00
Marc Mueller
fe21e2b8ba
Import Generator from typing_extensions (1) (#118986) 2024-06-06 17:02:13 +02:00
J. Nick Koston
ed0568c655
Ensure config entries are not unloaded while their platforms are setting up (#118767)
* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* run with error on to find them

* cert_exp, hold lock

* cert_exp, hold lock

* shelly async_late_forward_entry_setups

* compact

* compact

* found another

* patch up mobileapp

* patch up hue tests

* patch up smartthings

* fix mqtt

* fix esphome

* zwave_js

* mqtt

* rework

* fixes

* fix mocking

* fix mocking

* do not call async_forward_entry_setup directly

* docstrings

* docstrings

* docstrings

* add comments

* doc strings

* fixed all in core, turn off strict

* coverage

* coverage

* missing

* coverage
2024-06-04 21:34:39 -04:00
Raman Gupta
89ae425ac2
Update zwave_js WS APIs for provisioning (#117400) 2024-05-29 02:47:09 -04:00
J. Nick Koston
b58e0331cf
Migrate zwave_js to use async_unload_platforms (#118101) 2024-05-25 11:54:25 +02:00
Marc Mueller
9cbcf5f2a5
Improve zwave_js TypeVar usage (#117810)
* Improve zwave_js TypeVar usage

* Use underscore for TypeVar name
2024-05-21 07:42:07 +02:00
Marc Mueller
25d1ca747b
Use PEP 695 for decorator typing (3) (#117640) 2024-05-17 16:27:32 +02:00
Raman Gupta
61b906e29f
Bump zwave-js-server-python to 0.56.0 (#117288)
* Bump zwave-js-server-python to 0.56.0

* Fix deprecation warning

* Fix tests

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-12 22:19:47 -04:00
Raman Gupta
1f792fc2aa
Start using runtime_data for zwave_js (#117261)
* Start using runtime_data for zwave_js

* fix bug
2024-05-11 14:08:30 -04:00
Raman Gupta
9655db3d55
Fix zwave_js discovery logic for node device class (#117232)
* Fix zwave_js discovery logic for node device class

* simplify check
2024-05-11 17:41:03 +02:00
Sid
ac54cdcdb4
Enable Ruff RUF010 (#115371)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-08 23:54:49 +02:00
Sid
2cc916db6d
Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
Sid
b456d97e65
Replace pylint protected-access with Ruff SLF001 (#115735) 2024-05-06 20:33:26 +02:00