Commit Graph

226 Commits (d279211f0c0cd3d886f92952dbb337cd4868f13e)

Author SHA1 Message Date
Raman Gupta c477378835
Raise when zwave_js device automation fails validation (#65610) 2022-02-04 02:50:47 +01:00
Raman Gupta a420e9443c
Add version info to zwave js device diagnostics (#64573) 2022-01-20 12:55:47 -08:00
Raman Gupta f622bf4ff2
Fix bug for zwave_js diagnostics (#64568) 2022-01-20 12:38:34 -05:00
Raman Gupta 11d0dcf7ac
Add zwave_js device diagnostics (#64504)
* Add zwave_js device diagnostics

* Add diagnostics as a dependency in manifest

* Add failure scenario test

* fix device diagnostics helper and remove dependency

* tweak
2022-01-20 11:49:24 +01:00
Raman Gupta fd465df016
Bump zwave-js-server-python to 0.34.0 (#64407) 2022-01-18 22:33:50 -08:00
Raman Gupta c3fc7becb6
Add zwave_js support for diagnostics (#64336) 2022-01-17 22:00:53 -08:00
Raman Gupta 9bb78af79c
Ignore unavailable entities when creating zwave_js device actions list (#64184)
* Fix bug with zwave-js device actions

* outdent

* Add test and fix bug

* fix
2022-01-16 13:22:18 +01:00
Raman Gupta 7b3e5fdf9d
Fix zwave_js device actions (#63769) 2022-01-09 21:28:36 -08:00
Raman Gupta 9e4e43cf77
Handle zwave_js metadata/value updates when the unit changes (#63579)
* Handle zwave_js metadata updates when the unit changes

* Use value updated event instead of metadata updated event so we don't get an invalid state value

* update comments and formatting

* simplify

* Update tests/components/zwave_js/test_sensor.py

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

* Update tests/components/zwave_js/test_sensor.py

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

* Update tests/components/zwave_js/test_sensor.py

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

* fix tests

* add additional assertions

* Add unit checks and simplify logic

* Add unit assertion

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-01-08 13:23:29 +01:00
Dave T 817f0c9aae
Refactor enum zwave js tests (#62712)
* Use new enums in zwave_js tests

* Convert == to is

* Refactor some ATTR_ * as well.

* Address review comments
2022-01-01 21:50:48 +01:00
kpine 22e475790f
Avoid removing zwave_js devices for non-ready nodes (#59964)
* Only replace a node if the mfgr id / prod id / prod type differ

* Prefer original device name for unready node

* move register_node_in_dev_reg into async_setup_entry

* simplify get_device_id_ext

* Don't need hex ids

* Revert "move register_node_in_dev_reg into async_setup_entry"

This reverts commit f900e5fb0c67cc81657a1452b51c313bccb6f9e1.

* Revert Callable change

* Revert device backup name

* Add test fixtures

* Update existing not ready test with new fixture data

* Check device properties after node added event

* Add entity check

* Check for extended device id

* better device info checks

* Use receive_event to properly setup components

* Cleanup tests

* improve test_replace_different_node

* improve test_replace_same_node

* add test test_node_model_change

* Clean up long comments and strings

* Format

* Reload integration to detect node device config changes

* update assertions

* Disable entities on "value removed" event

* Disable node status sensor on node replacement

* Add test for disabling entities on remove value event

* Add test for disabling node status sensor on node replacement

* disable entity -> remove entity

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-12-27 12:31:31 +01:00
Raman Gupta 639181108f
Add zwave_js support for Fortrezz SSA3 (#62765) 2021-12-25 10:33:20 +01:00
Ville Skyttä ea58432721
Use DeviceAutomationType in tests/components/[s-z]* (#62450) 2021-12-21 11:56:00 +01:00
Ville Skyttä 5bf67cac66
Use RegistryEntryDisabler (#60436) 2021-12-15 23:25:40 +02:00
Ville Skyttä 7db3246de4
Make config entry disabled_by an enum (#60445)
* Make config entry disabled_by an enum

* Update homeassistant/config_entries.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-12-15 20:53:21 +01:00
epenet e64f901e92
Use dataclass properties in zwave_js (#60913)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-03 14:47:56 +01:00
epenet 358922db56
Use dataclass for HassioServiceInfo (#60824)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-03 14:05:56 +01:00
Erik Montnemery 0e3bc21d54
Teach state and numeric_state conditions about entity registry ids (#60841) 2021-12-02 14:55:12 -08:00
epenet 2be939b45b
Use HassioServiceInfo in zwave_js tests (#60863) 2021-12-02 20:57:45 +01:00
Martin Hjelmare c8781bbe3b
Simplify zwave_js USB discovery add-on form (#60845) 2021-12-02 16:30:01 +01:00
Raman Gupta eeafa36abc
Add SmartStart provisioning support to zwave_js WS API (#59037)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-12-01 11:43:51 +01:00
Michael Kowalchuk 15bf4dae9b
Add zwave_js speed configurations for GE/Jasco 12730 and 14287 fans (#60517) 2021-11-29 08:27:32 +01:00
Erik Montnemery caf5ee2fab
Remove optional validation when creating conditions (#60481) 2021-11-28 14:54:07 +01:00
epenet 5a8cbb8cab
Use UsbServiceInfo in zwave-js (#60267)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-24 07:51:28 -06:00
Michael Kowalchuk 74cfbf5f42
Use configured speed ranges for HomeSeer FC200+ fan controllers in zwave_js (#59697)
* Use configured speed ranges for HomeSeer FC200+ fan controllers in zwave_js

* Fix pylint errors

* Remove unused param in tests

* Fix test values

* Address various review notes

* Remove now-redundant assertion

* Add an additional test case for set_percentage=0

* Use round() instead of int() for percentage computations; this makes the percentage setting match the setpoints in the UI

* Add additional tests

* Fix pct conversions

* Make conversion tests exhaustive

* Add tests for discovery data templates

* Revert "Add tests for discovery data templates"

This reverts commit 85dcbc0903.

* Improve typing on ConfigurableFanSpeedDataTemplate#resolve_data

* Move config error handling to the discovery data template

* Fix checks for config data

* Revise fallback logic in percentage_to_zwave_speed and ensure that the speed list is non-empty

* Rework error handling

* Fix runtime fan speed updates

* Use warning instead of warn

* Move data validation to get_speed_config; turns out that resolve_data is only called once, at startup.

* Temporarily remove the not-yet-used fixed fan speed template.  Add an additional assertion to ensure speeds are sorted.

* Add a comment about the assertions in discovery_data_template.py

* Update homeassistant/components/zwave_js/discovery_data_template.py

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

* Fix typo in comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-11-24 11:31:59 +01:00
Martin Hjelmare d5fcf0b622
Add zwave_js binary sensor entity category (#58703)
* Add zwave_js binary sensor entity category

* Handle non idle notification state

* Fix door state

* Fix duplicate door state description

* Add tests
2021-11-09 18:26:34 +01:00
Martin Hjelmare 30cba6ee8b
Add zwave_js select entity category (#59157)
* Set zwave_js select entity as category config

* Update tests
2021-11-05 10:31:51 -04:00
Paulus Schoutsen 31153ac155
Move fixtures part 1 (#58902) 2021-11-01 20:47:05 -07:00
Martin Hjelmare 3a76d92e0f
Add zwave_js binary sensor descriptions (#58641) 2021-10-28 21:28:02 -07:00
Paul Frank 3705f2f7f1
Open and close tilt for Fibaro devices in zwave_js (#58435)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-28 22:30:34 +02:00
Raman Gupta b71773fd1d
Set entity_category for node status sensor (#58434) 2021-10-25 17:54:13 -04:00
Martin Hjelmare 5642350070
Add zwave_js sensor entity categories (#58416) 2021-10-25 18:14:44 +02:00
Ville Skyttä 0de95610e3
Use http.HTTPStatus in components/[wxyz]* (#58330) 2021-10-24 17:25:01 +02:00
Raman Gupta 3476b430db
Convert val to str when needed while calling zwave_js.set_value (#57216) 2021-10-07 13:22:33 -07:00
Paulus Schoutsen a4d9019ffc
Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
Raman Gupta 3c074ab865
Add additional properties to node_status WS cmd (#56927)
* Add node.zwave_plus_version to node_status WS command

* Add highest security class to node_status
2021-10-05 11:23:44 -04:00
Martin Hjelmare 12b2076351
Fix zwave_js config flow import step (#56808) 2021-09-30 01:15:05 +02:00
Martin Hjelmare fa716d92ad
Manage s2 keys in zwave_js (#56783) 2021-09-29 15:04:24 -07:00
Martin Hjelmare 50fffe48f8
Add zwave to zwave_js migration (#56159)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-09-29 08:55:27 -07:00
Raman Gupta e76ddb4b27
Add proper S2 support for adding zwave_js nodes (#56516)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-28 15:37:45 -07:00
Raman Gupta e690d4b006
Add support for zwave_js device actions (#53038)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-28 09:06:02 +02:00
Marius 4ce7166afd
Add node sensor status icons (#56137)
Co-authored-by: kpine <keith.pine@gmail.com>
Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
2021-09-27 12:50:14 +02:00
Raman Gupta 8716aa011a
Add support for multilevel switch CC select entities (#56656)
* Add support for multilevel switch CC select entities

* Use state names from docs and include more device identifiers from device DB

* black

* pylint

* type fix

* Add failure scenario test

* Update homeassistant/components/zwave_js/select.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-26 14:22:41 -04:00
Raman Gupta b1f4ccfd6b
Reuse zwave_js device when replacing removed node with same node (#56599)
* Reuse zwave_js device when a removed node is replaced with the same node

* Ensure change is backwards compatible with servers that don't include replaced

* Remove lambda

* Add assertions to remove type ignores

* fix tests by always copying state and setting manufacturer/label attributes
2021-09-25 10:43:37 +02:00
Raman Gupta c785983cce
Handle entity creation on new added zwave_js value (#55987)
* Handle new entity creation when a new value is added

* spacing

* Update homeassistant/components/zwave_js/__init__.py

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

* change variable name and use asyncio.gather

* Centralized where discovered value IDs gets managed

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-10 23:49:31 +02:00
Raman Gupta 113288cb1f
Fix zwave_js/node_state WS API command (#55979)
* Fix zwave_js/node_state WS API command

* Add negative assertion check to avoid regression

* Update tests/components/zwave_js/test_api.py

Co-authored-by: jan iversen <jancasacondor@gmail.com>

* use constant

Co-authored-by: jan iversen <jancasacondor@gmail.com>
2021-09-09 14:04:27 -04:00
Martin Hjelmare b088ce601c
Bump zwave-js-server-python to 0.30.0 (#55831) 2021-09-06 13:37:12 -07:00
J. Nick Koston d8a81a54d8
Narrow zwave_js USB discovery (#55613)
- Avoid triggering discovery when we can know in advance the
  device is not a Z-Wave stick
2021-09-03 05:11:03 +02:00
Raman Gupta 02eba22068
Add additional test coverage for zwave_js meter sensors (#55465) 2021-09-01 17:22:17 -04:00
Raman Gupta 331726ec2f
Bump zwave-js-server-python to 0.29.1 (#55460) 2021-08-30 09:40:56 -07:00