Commit graph

925 commits

Author SHA1 Message Date
Erik Montnemery
82efb3d35b
Make FlowResult a generic type (#111952) 2024-03-07 12:41:14 +01:00
Erik Montnemery
3d3e9900c3
Add TypeVar default for FlowResult (#112345)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-03-05 22:52:11 +01:00
Erik Montnemery
a0e558c457
Add generic classes BaseFlowHandler and BaseFlowManager (#111814)
* Add generic classes BaseFlowHandler and BaseFlowManager

* Migrate zwave_js

* Update tests

* Update tests

* Address review comments
2024-02-29 16:52:39 +01:00
J. Nick Koston
4414b468f3
Import zwave_js in the executor to avoid blocking the event loop (#111622)
`2024-02-27 10:55:54.872 DEBUG (MainThread) [homeassistant.loader] Component zwave_js import took 0.780 seconds (loaded_executor=False)`
2024-02-27 13:14:27 +01:00
Joost Lekkerkerker
730d805876
Enable SIM114 ruff rule (#111125) 2024-02-23 13:21:59 +01:00
J. Nick Koston
ae49b3a274
Add async_schedule_reload helper to the ConfigEntries manager (#110912)
* Add async_schedule_reload helper to the ConfigEntries manager

We have cases where the the setup retry kicks in right before
the reload happens causing the reload to fail with
OperationNotAllowed. The async_schedule_reload will
cancel the setup retry before the async_reload task
is created to avoid this problem.

I updated a few integrations that were most likely
to have this problem. Future PRs will do a more
extensive audit

* coverage

* revert for now since this needs more refactoring in a followup

* cover

* cleanup and fixes
2024-02-20 02:14:45 +01:00
Raman Gupta
92c3c401b9
Remove unused instance variable in Z-wave (#110442)
* Remove unused variable and fix typing in zwave_js

* remove redundant type
2024-02-13 03:55:49 +01:00
Raman Gupta
c1d61b9748
Improve climate turn_on/turn_off services for zwave_js (#109187)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-02-12 19:06:23 -05:00
Marc Mueller
5de76c0be0
Include exception when reraising inside except (#109706) 2024-02-06 12:17:39 +01:00
Marc Mueller
8b0c9d3d18
Use builtin TimeoutError [t-z] (#109683) 2024-02-05 12:20:36 +01:00
Raman Gupta
c2525d53dd
Add translations for zwave_js entities and services (#109188) 2024-02-01 21:07:47 +01:00
Marc Mueller
d2dee9e327
Update ruff to 0.1.15 (#109303) 2024-02-01 13:29:01 +01:00
Raman Gupta
1af25bc010
Remove deprecation warnings for zwave_js climate TURN_ON/TURN_OFF features (#109242) 2024-02-01 11:21:40 +01:00
Raman Gupta
2b525ed2e9
Make zwave_js last seen sensor enabled by default (#109191)
* Make zwave_js last seen sensor enabled by default

* Add test

* Fix test

* improve tests
2024-02-01 02:55:48 +01:00
Raman Gupta
9ed50d8b0c
Add last seen sensor for zwave_js devices (#107345) 2024-01-31 01:17:43 -05:00
Raman Gupta
b8c9da4705
Add icon and state translations for zwave_js sensors (#109186) 2024-01-30 23:38:27 -05:00
Raman Gupta
821d273e4d
Add support for ignoring zwave_js device config file changes (#108990)
* Add support for ignoring zwave_js device config file changes

* mistake

* fixes

* Small tweaks and add/update tests
2024-01-30 10:16:08 +01:00
Raman Gupta
18d395821d
Don't remove zwave_js devices automatically (#98145) 2024-01-29 21:36:41 -05:00
kpine
be8af7bea3
Fix zwave_js set_config_parameter WS api regression (#109042) 2024-01-29 18:04:05 +01:00
Erik Montnemery
da7d2ef228
Fix light color mode in zwave_js (#108783) 2024-01-25 09:46:22 +01:00
Jan Bouwhuis
c47fb5d161
Remove deprecated redundant dry and fan modes from zwave_js climates (#108124)
Remove deprecated redundant dry and fan modes from zwave_js climates
2024-01-17 15:55:46 +01:00
J. Nick Koston
4b7a313ece
Use identity checks for CoreState (#107846)
Some of the checks used ==, and some used is. Switch
everything to is as its faster
2024-01-12 10:21:26 +01:00
Erik Montnemery
2a0bd6654b
Improve calls to async_show_progress in zwave_js (#107794) 2024-01-11 13:07:43 +01:00
Raman Gupta
85cdbb5ade
Bump zwave-js-server-python to 0.55.3 (#107225)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-05 12:38:00 +01:00
Martin Hjelmare
00ff93a69e
Set zwave_js voltage sensor suggested precision (#107116) 2024-01-05 01:03:28 -05:00
J. Nick Koston
0695bf8988
Move group helpers into their own module (#106924)
This gets rid of the legacy need to use bind_hass, and
the expand function no longer looses typing.
2024-01-04 17:34:56 +01:00
Martin Hjelmare
80a616d237
Remove zwave_js numeric sensor rounding (#107100) 2024-01-04 13:49:15 +01:00
Martin Hjelmare
c462d5b8ca
Bump zwave-js-server-python to 0.55.2 (#106496) 2023-12-27 21:05:26 +01:00
Raman Gupta
18ace16744
Bump zwave-js-server-python to 0.55.1 (#105502) 2023-12-25 23:29:05 -05:00
Ville Skyttä
24b1e01d71
Update Ruff to 0.1.8, avoid linter/formatter conflicts (#106080)
* Disable Ruff rules that may conflict with the formatter

* Upgrade Ruff to 0.1.8

- https://github.com/astral-sh/ruff/releases/tag/v0.1.7
- https://github.com/astral-sh/ruff/releases/tag/v0.1.8

* Format with Ruff 0.1.8
2023-12-20 23:55:09 +01:00
Erik Montnemery
0c2485bc03
Freeze integration entity descriptions (#105984)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-18 16:28:13 -10:00
Erik Montnemery
dd338799d4
Make it possible to inherit EntityDescription in frozen and mutable dataclasses (#105211) 2023-12-11 20:00:55 +01:00
Raman Gupta
4e1677e3f0
Remove zwave_js device on device reset (#104291)
* Reload zwave_js config entry on device reset

* remove device

* Just remove the device and don't reload

* revert change to notification message

* Assert device is no longer there
2023-12-09 23:33:31 +01:00
Marc Mueller
c93abd9d20
Improve decorator type annotations [zwave_js] (#104825)
* Improve decorator type annotations [zwave_js]

* Improve _async_get_entry annotation
2023-12-06 16:22:32 +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
7a060176b6
Bump zwave-js-server-python to 0.54.0 (#103943) 2023-11-14 08:30:15 +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
Raman Gupta
ac1dc4eeea
Fix firmware update failure (#103277) 2023-11-03 12:08:40 +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
Raman Gupta
13378b4ae2
Add script to convert zwave_js device diagnostics to fixture (#102799) 2023-10-25 16:07:22 -04:00
Raman Gupta
8b1cfbc46c
Bump zwave-js-server-python to 0.53.1 (#102790) 2023-10-25 17:22:33 +02:00