Commit Graph

434 Commits (949ca6bafcb632d147529aa7e0666a26fb559b9f)

Author SHA1 Message Date
Erik Montnemery 5b55c7da5f
Remove logic converting empty or falsy YAML to empty dict (#103912)
* Correct logic converting empty YAML to empty dict

* Modify according to github comments

* Add load_yaml_dict helper

* Update check_config script

* Update tests
2023-12-05 18:08:11 +01:00
Jan Bouwhuis 953a212dd6
Use ServiceValidationError for invalid fan preset_mode and move check to fan entity component (#104560)
* Use ServiceValidationError for fan preset_mode

* Use _valid_preset_mode_or_raise to raise

* Move preset_mode validation to entity component

* Fix bond fan and comments

* Fixes baf, fjaraskupan and template

* More integration adjustments

* Add custom components mock and test code

* Make NotValidPresetModeError subclass

* Update homeassistant/components/fan/strings.json

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

* Keep bond has_action validation

* Move demo test asserts outside context block

* Follow up comment

* Update homeassistant/components/fan/strings.json

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Fix demo tests

* Remove pylint disable

* Remove unreachable code

* Update homeassistant/components/fan/__init__.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Use NotValidPresetModeError, Final methods

* Address comments

* Correct docst

* Follow up comments

* Update homeassistant/components/fan/__init__.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-11-29 13:56:51 +01:00
Aarni Koskela 706add4a57
Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
Raman Gupta a074c06f92
Add alert to zwave_js device info page for custom device config (#104115) 2023-11-26 10:08:20 +01:00
Geir Råness d4450c6c55
Add Z-wave climate sensor override for Heatit Z-TRM6 (#103896)
* add some basic overrides for z-trm6

* switched id and type

* add fixtures some lints

* duplicate tests of z-trm3

* add broken test for trm6

* fix tests, remove name from fixtures, fix comment

* lints

* forgot lints

* add better description on pwer mode

* Update comment v2

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

* fix space from github web merge

* lint on fixture

* fix permissions on fixture

---------

Co-authored-by: geir råness <11741725+geirra@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-11-24 11:01:15 +01:00
Raman Gupta e9920ff73d
Add select entity for zwave_js Door Lock CC (#104292)
* Add select entity for zwave_js Door Lock CC

* fix test
2023-11-23 12:51:29 +01:00
Raman Gupta c132900b92
Add zwave_js.set_lock_configuration service (#103595)
* Add zwave_js.set_lock_configuration service

* Add tests

* string tweaks

* Update homeassistant/components/zwave_js/lock.py

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

* Update strings.json

* Update services.yaml

* Update lock.py

* Remove handle params

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-11-15 17:01:20 +01:00
Raman Gupta f511a8a26a
Expand `zwave_js.set_config_parameter` with additional parameters (#102092) 2023-11-08 17:05:31 -05:00
Raman Gupta 0fcaa2c581
Add `zwave_js.refresh_notifications` service (#101370) 2023-11-07 09:11:38 -05:00
Raman Gupta 2b3d57859e
Add test for firmware update scenario (#103314) 2023-11-04 13:12:06 +01:00
Raman Gupta eeb88f5e07
Fix zwave_js cover bug for Window Covering CC values (#103289)
* Fix cover bug for Window Covering CC values

* update test

* Fix fixture

* Remove no-op line from test
2023-11-03 15:36:48 +01:00
kpine 46ecf0d4bd
Revert "Fix temperature setting for multi-setpoint z-wave device (#102395)" (#103022)
This reverts commit 2d6dc2bccc.
2023-10-29 19:15:19 +01:00
Raman Gupta 94e192db12
Fix zwave_js siren name (#103016)
* Fix zwave_js.siren name

* Fix test
2023-10-29 17:44:15 +01:00
Erik Montnemery 03d3a87f23
Small cleanup of legacy groups (#102918)
* Small cleanup of legacy groups

* Update tests which create groups
2023-10-28 17:16:41 +02:00
Raman Gupta 13378b4ae2
Add script to convert zwave_js device diagnostics to fixture (#102799) 2023-10-25 16:07:22 -04:00
Raman Gupta ec3ee7f02c
Update zwave_js/hard_reset_controller WS cmd (#102280) 2023-10-24 21:31:03 -04:00
Raman Gupta 41b59b6990
Add support for zwave_js event entities (#102285)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-10-20 19:11:08 -04:00
kpine c7affa75d4
Fix temperature setting for multi-setpoint z-wave device (#102395)
* Fix temperature setting for multi-setpoint z-wave device

* Add missing fixture file

* Apply suggestions from code review

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-10-20 19:57:00 +02:00
Paul Bottein c98c18f25e
Return 'None' for light attributes when off instead of removing them (#101946) 2023-10-19 01:08:08 +02:00
Raman Gupta 7d8ea404b3
Make Basic CC Z-Wave values a light (#101438) 2023-10-13 11:11:44 -04:00
Raman Gupta 70a0cd579d
Add Z-Wave WS command to hard reset controller (#101449) 2023-10-09 13:33:31 -04:00
Raman Gupta 383c63000e
Handle invalid scale for zwave_js multilevel/meter sensors (#101173)
* Handle invalid scale for zwave_js multilevel/meter sensors

* Remove logging statement
2023-10-04 22:55:18 -04:00
Raman Gupta d3c5b9777b
Notify users when zwave device gets reset (#101362)
* Notify users when zwave device gets reset

* review comments
2023-10-04 10:18:48 +02:00
Raman Gupta 7b9c1c3953
Fix zwave_js firmware update logic (#101143)
* Fix zwave_js firmware update logic

* add comment

* tweak implementation for ssame outcome
2023-09-29 23:05:33 -04:00
lennart24 b43262014f
Add shutter_tilt support for Fibaro FGR 223 (#96283)
* add support for shutter_tilt for Fibaro FGR 223
add tests for fgr 223

* Adjust comments and docstring

---------

Co-authored-by: Lennart <18117505+Ced4@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-09-28 12:59:02 +02:00
Raman Gupta 70e3da207a
Automatically enable/disable zwave_js server logging in lib (#100837)
* Bump zwave-js-server-python to 0.52.0

* Add WS command to enabled zwave_js server logging in lib

* enable and disable server logging automatically

* fix conditionals

* fix tests

* Add logging

* small tweaks

* Add logger as a dependency

* fix test

* Prepare for movement of event constant

* Add constant so tests pass
2023-09-27 01:17:52 -04:00
Raman Gupta 65f307fe9c
Add endpoint to `zwave_js_notification` event (#100951) 2023-09-26 18:48:59 -04:00
Raman Gupta 176f5dc2d6
Bump zwave-js-server-python to 0.52.0 (#100833)
* Bump zwave-js-server-python to 0.52.0

* remove old function

* fix tests
2023-09-26 17:05:54 -04:00
J. Nick Koston 0eca433004
Update zeroconf discovery to use IPAddress objects to avoid conversions (#100567) 2023-09-19 18:58:46 +02:00
Raman Gupta e231da42e1
Handle disconnects in zwave_js repair flow (#99964)
* Handle disconnects in zwave_js repair flow

* Combine logic to reduce LoC

* only check once
2023-09-12 04:21:44 +02:00
Thomas Roager 74a7bccd65
Add zdb5100 light to zwave_js (#97586)
* added zdb5100 light

* added light to zdb5100

* Update tests/components/zwave_js/conftest.py

agree

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

* Update tests/components/zwave_js/conftest.py

agree

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

* Rename logic_group_zdb5100_light_state.json to logic_group_zdb5100_state.json

name change

* Update tests/components/zwave_js/test_light.py

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

* Update test_light.py

updated test and state

* Update test_light.py

incorrect endpoint

* changed the state

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-09-09 16:01:32 +02:00
Raman Gupta 5afba6327c
Bump zwave-js-server-python to 0.51.1 (#99652)
* Bump zwave-js-server-python to 0.51.1

* Update test

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-09-05 09:58:32 -04:00
Raman Gupta 169a318ec4
Fix device name in zwave_js repair flow (#99414) 2023-09-01 18:06:37 +02:00
Raman Gupta 867e9b73bb
Add zwave_js device config file change fix/repair (#99314)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-08-30 17:29:22 +02:00
Raman Gupta 6e5f4566d5
Add zwave_js controller status sensor (#99252)
* Add zwave_js controller status sensor

* Also update network status command

* fix tests

* Remove WS command since we have a sensor entity

* Update sensor.py

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

* move driver assertion out of closures

* store state in tests

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-08-30 06:50:23 -04:00
Raman Gupta 40748a6c34
Add zwave_js controller identify event (#99254) 2023-08-30 11:32:41 +02:00
Raman Gupta be126da72d
Bump zwave-js-server-python to 0.51.0 (#99250)
* Bump zwave-js-server-python to 0.51.0

* Fix how we patch the command
2023-08-29 02:45:43 -04:00
Erik Montnemery f1d4a4bd26
Adjust zwave_js tests which create devices (#98213) 2023-08-10 18:27:22 +02:00
Franck Nijhof 868a5f377f
Ruff: isort don't split imports based on trailing comma (#98162) 2023-08-10 14:27:03 +02:00
Raman Gupta 5d3d66e47d
Bump zwave-js-server-python to 0.50.1 (#94760)
* Bump zwave-js-server-python to 0.50.0

* handle additional upstream changes

* Additional changes

* fix tests

* Convert two similar functions to be one function

* Fix docstring

* Remove conditional pydantic import

* Revert scope change

* Bump zwave-js-server-python

* Set default return value for command

* Remove line breaks

* Add coverage
2023-08-10 01:28:08 -04:00
Adrián Moreno f2726527f2
Create zwave_js repair issue instead of warning log entry (#95997)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-07-25 09:55:05 +02:00
Erik Montnemery a8d77cc5ad
Teach zwave_js device trigger about entity registry ids (#96303) 2023-07-22 17:29:24 +02:00
Erik Montnemery 57352578ff
Use entity registry id in zwave_js device actions (#96407) 2023-07-18 09:36:40 +02:00
Erik Montnemery 7539cf25be
Don't require passing identifiers to DeviceRegistry.async_get_device (#96479)
* Require keyword arguments to DeviceRegistry.async_get_device

* Update tests

* Update tests

* Don't enforce keyword arguments
2023-07-13 13:39:25 -04:00
Adrián Moreno 0e428f8d39
Deprecate Dry and Fan preset modes in favor of HVAC modes (#95634)
* zwave_js: deprecate Dry and Fan preset modes

Migrating Dry and Fan presets to HVAC modes

* Move consts. Set Dry and Fan as HVAC-first modes.

* Update homeassistant/components/zwave_js/climate.py

Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>

* Fix tests

* Keep track of HA release when deprecation was introduced

---------

Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
2023-07-05 15:12:21 -04:00
Raman Gupta 5265584159
Fix zwave_js device diagnostics dump (#94999)
* Fix zwave_js device diagnostics dump

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* improve test

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-22 10:10:36 -04:00
Erik Montnemery 6183a36fce
Replace assert_lists_same with pytest_unordered in integrations t-z (#94903) 2023-06-20 20:23:49 +02:00
Allen Porter 12129e9d21
Update service call return values and error handling (#94657)
* Update return signature of service calls

* Add timeout error handling in websocket api for service calls

* Update recorder tests to remove assertion on service call

* Remove timeout behavior and update callers that depend on it today

* Fix tests

* Add missing else

* await coro directly

* Fix more tests

* Update the intent task to use wait instead of timeout

* Remove script service call limits and limit constants

* Update tests that depend on service call limits

* Use wait instead of wait_for and add test

* Update homeassistant/helpers/intent.py

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

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-16 07:01:40 -07:00
Raman Gupta 934e1a1603
Fix zwave_js trigger event reattach logic (#94702) 2023-06-16 09:35:29 +02:00
Raman Gupta f3ca3a8ee0
Set default value for endpoint in zwave device automations (#94445)
* Set default value for endpoint in zwave device automations

* add test case
2023-06-12 21:34:09 -04:00