* Add WS API commands to capture zwave_js logs from server
* register commands
* create a task
* Update homeassistant/components/zwave_js/api.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/zwave_js/api.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* fix
* fixes and add test
* fix PR on rebase
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Migrate existing zwave_js entities if endpoint has changed
* better function name
* cleanup code
* return as early as we can
* use defaultdict instead of setdefault
* PR comments
* re-add missing logic
* set defaultdict outside of for loop
* additional cleanup
* parametrize tests
* fix reinterview logic
* test that we skip migration when multiple entities are found
* Update tests/components/zwave_js/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add zwave_js.bulk_set_partial_config_parameters service
* update to handle command status
* add test for awake node
* test using a device in service call
* Bump zwave-js-server-python to 0.23.0 and update integration to support schema changes
* refactor notification evenets a bit
* fix tests and bug fixes
* additional changes due to new PR
* add command class and command name
* use new event names so we can retain event property names
* handle command status being returned from async_set_config_parameter
* bump dependency version
* adjust log message to be consistent
* disable pylint warning
* Update homeassistant/components/zwave_js/services.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* add test for awake node
* switch async_get_registry to async_get
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* add number platform to zwave_js integration
* add discovery scheme for thermostat valve control, using number platform
Co-authored-by: kpine <keith.pine@gmail.com>
* migrate zwave_js entities to use new unique ID format
* remove extra param from helper
* add comment to remove migration logic in the future
* update comment
* use instance attribute instead of calling functino on every state update
* add poll_value service
* switch vol.All to vol.Schema
* more relevant log message
* switch service name to refresh_value, add parameter to refresh all watched values, fix tests
* rename parameter and create task for polling command so we don't wait for a response
* raise ValueError for unknown entity
* better error message
* fix test
* create zwave_js.set_config_value service
* update docstring
* PR comments
* make proposed changes
* handle providing a label for the new value
* fix docstring
* use new library function
* config param endpoint is always 0
* corresponding changes from upstream PR
* bug fixes and add tests
* create zwave_js.set_config_value service
* update docstring
* PR comments
* make proposed changes
* handle providing a label for the new value
* fix docstring
* use new library function
* config param endpoint is always 0
* corresponding changes from upstream PR
* bug fixes and add tests
* use lambda to avoid extra function
* add services description file
* bring back the missing selector
* move helper functions to helper file for reuse
* allow target selector for automation editor
* formatting
* fix service schema
* update docstrings
* raise error in service if call to set value is unsuccessful
* Update homeassistant/components/zwave_js/services.yaml
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Update homeassistant/components/zwave_js/services.yaml
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Update homeassistant/components/zwave_js/services.yaml
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Update homeassistant/components/zwave_js/services.yaml
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Update homeassistant/components/zwave_js/services.yaml
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Update homeassistant/components/zwave_js/services.yaml
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* remove extra param to vol.Optional
* switch to set over list for nodes
* switch to set over list for nodes
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Add zwave_js.update_log_config service
* fix comment
* reduce lines
* move update_log_config from service to ws API call
* fix docstring
* Add zwave_js/get_log_config WS API command
* resolve stale comments
* remove transports since it will be removed from upstream PR
* add support to update all log config parameters since they could be useful outside of the UI for advanced users
* fix comment
* switch to lambda instead of single line validator
* fix rebase
* re-add ATTR_DOMAIN
* Remove unused "fibaro_fgs222" discovery hint
* Simplify multilevel switch current value discovery schema
* Force iBlinds v2.0 devices to be discovered as cover entities
* Rename discovery test file
* add thermostat fan mode and fan state support
* return when fan mode is not supported
* use get just in case
* validate state key is in states so we dont have to use get
* pylint
* Fix issue with control of cover when the target value is Up/Down instead of Open/Close
* Adjust open/close/stop cover control to account for no Open/Up or Close/Down targets
* Revert back to using values of 0/99 to close/open a cover since it is supported by all covers
* Replace RELEASE_BUTTON with False and remove unused PRESS_BUTTON in zwave_js cover
* Remove v4 multilevel transitional currentValue workaround
This was only needed because the get-after-set was reporting a
transitional currentValue instead of the final one.
zwave-js v6.1.1 removes the get-after-set functionality completely, so
this is no longer required (and breaks status reporting entirely)
* Fix tests to check currentValue instead of targetValue as well
* Use new zwave_js client
* Remove client callbacks
* Clean up on connect and on disconnect
* Clean log
* Add stop listen to unsubscribe callbacks
* Fix most tests
* Adapt to new listen interface
* Fix most tests
* Remove stale connection state feature
* Bump zwave-js-server-python to 0.16.0
* Clean up disconnect
* Remove zwave_js devices that the controller is no longer connected to on initialization
* remove extra line break
* fix test
* Clean up
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Lint
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* add zwave_js support for climate
* fix
* add fixture
* rename fixture
* fix variable name error
* add tests
* fix tests and handle set_temp properly based on unit
* update call being tested
* fix tests
* improve coverage
* fix docstring
* address review comments
* fix test
* update enum class name
* bump zwave-js-server-python version and assume primary_value is always set
* add additional coverage
* fix docstrings and move populating modes/presets into initialization
* attempt to address comments
* improve comment
* move mode value into a variable so its easier to iterate in the future
* dont assume mode as a discovery point
* assume all values are available when node is ready
* fix order of operations
* switch to valueerror
* use primary value
* readd property and type to discovery schema
* Add bulb 6 multi color device state fixture
* Add light test foundation
* Add no cover comment for todo code
* Update hs_color
* Test turn on light
* Test light turn off
* Fix brightness comparison
* Test setting same brightness
* Test setting same rgb color
* Test color temp update
* Test setting same color temp
* Add entity module to coverage calculation
* Fix typing
* Add entry setup and unload test
* Test home assistant stop
* Test on connect and on disconnect
* Test client connect timeout
* Test ready node added
* Test non ready node added
* Test existing node not ready
* Test device registry state
* Add common test tools module
* Add existing ready node test
* Include init module in coverage calculation
* Clean docstrings
* Run zwave_js scaffold (#44891)
* Add zwave_js basic connection to zwave server (#44904)
* add the basic connection to zwave server
* fix name
* Fix requirements
* Fix things
* Version bump dep to 0.1.2
* fix pylint
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Bump zwave-js-server-python to 0.2.0
* Use zwave js server version check instead of fetching full state (#44943)
* Use version check instead of fetching full state
* Fix tests
* Use 0.3.0
* Also catch aiohttp client errors
* Update docstring
* Lint
* Unignore zwave_js
* Add zwave_js entity discovery basics and sensor platform (#44927)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Complete zwave_js typing (#44960)
* Type discovery
* Type init
* Type entity
* Type config flow
* Type sensor
* Require typing of zwave_js
* Complete zwave_js config flow test coverage (#44955)
* Correct zwave_js sensor device class (#44968)
* Fix zwave_js KeyError on entry setup timeout (#44966)
* Bump zwave-js-server-python to 0.5.0 (#44975)
* Remove stale callback signal from zwave_js (#44994)
* Add light platform to zwave_js integration (#44974)
* add light platform
* styling fix
* fix type hint
* Fix typing
* Update homeassistant/components/zwave_js/const.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/zwave_js/entity.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/zwave_js/entity.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/zwave_js/entity.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/zwave_js/entity.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/zwave_js/entity.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* color temp should be integer
* guard Nonetype error
* Update homeassistant/components/zwave_js/light.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/zwave_js/light.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* some fixes after merging
* add additional guards for None values
* adjustments for rgb lights
* Fix typing
* Fix black
* Bump zwave-js-server-python to 0.6.0
* guard value updated log
* remove value_id lookup as its no longer needed
* fiz sending white value
* Update homeassistant/components/zwave_js/light.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add zwave_js test foundation (#44983)
* Exclude text files from codespell
* Add basic dump fixture
* Add test foundation
* Fix test after rebase
* Exclude jsonl files from codespell
* Rename fixture file type to jsonl
* Update fixture path
* Fix stale docstring
* Add controller state json fixture
* Add multisensor 6 state json fixture
* Update fixtures
* Remove basic dump fixture
* Fix fixtures after library bump
* Update codeowner
* Minor cleanup Z-Wave JS (#45021)
* Update zwave_js device_info (#45023)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>