* 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>
* 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>
* 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>
* 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>
* 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>
* 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
* 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>