home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.81k stars 30.51k forks source link

Error setting config parameters with Z-Wave JS #47416

Closed ahknight closed 3 years ago

ahknight commented 3 years ago

The problem

I'm trying to convert an OZW service call over to ZWJS now that I can set config values, but I'm running into some issues. I get the errors in the logs saying: "Value" object has no attribute 'configuration_value_type'/

What is version of Home Assistant Core has the issue?

core-2021.3.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

zwave_js

Link to integration documentation on our website

https://rc.home-assistant.io/integrations/zwave_js

Example YAML snippet

# Put your YAML below this line
service: zwave_js.set_config_parameter
data:
  parameter: 'Enable / Disable Custom LED Status Mode'
  value: 'Disable'
target:
  device_id: ee8088477e8346776876ebaf1829602a

Anything in the logs that might be useful for us?

# Put your logs below this line
Logger: homeassistant.components.automation.zwjs_living_room_dimmer_led_mode
Source: components/zwave_js/services.py:107 
Integration: Automation (documentation, issues) 
First occurred: 4:18:10 PM (2 occurrences) 
Last logged: 4:18:10 PM

ZWJS: Living Room Dimmer: LED Mode: Error executing script. Unexpected error for call_service at pos 1: 'Value' object has no attribute 'configuration_value_type'
While executing automation automation.zwjs_living_room_dimmer_led_mode
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 262, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 463, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1488, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1523, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/components/zwave_js/services.py", line 107, in async_set_config_parameter
    zwave_value = await async_set_config_parameter(
  File "/usr/local/lib/python3.8/site-packages/zwave_js_server/util/node.py", line 59, in async_set_config_parameter
    zwave_value.configuration_value_type == ConfigurationValueType.ENUMERATED
AttributeError: 'Value' object has no attribute 'configuration_value_type'
kpine commented 3 years ago

Please attach (drag and drop into a comment) the network dump file.

ahknight commented 3 years ago

zwave_js_dump.json.zip

ahknight commented 3 years ago

FWIW, I also tried parameter: 13 and value: 0 but received the same or similar errors. However, the LED color settings worked fine to set one light to Red by name.

kareem613 commented 3 years ago

Same issue here trying to set a config param on an inovelli switch.

service: zwave_js.set_config_parameter
data:
  parameter: 'LED Strip Effect'
  value: 33489741
target:
  entity_id: light.office_dimmer

Tried parameter 16 instead of the string name as well.

raman325 commented 3 years ago

@kareem613 can you attach a state dump? And are you on the latest patch release or are you also on 2021.3.0?

kareem613 commented 3 years ago

@kareem613 can you attach a state dump? And are you on the latest patch release or are you also on 2021.3.0?

There have been a couple of updates since. Now on core-2021.3.4 and zwavejs addon 0.1.12. The config param service call works now. I can't get this addon to successfully interview all my devices, even though zwave2mqtt addon does fine. That one still has this config parameter service call issue though. Kind of stuck in limbo, but at least this is no longer an issue with the core addon.

raman325 commented 3 years ago

yeah so the zwavejs2mqtt addon upgraded to a version of zwave-js that some config parameter functionality is broken in. This will get resolved in 2021.4

cgarwood commented 3 years ago

This issue should have been resolved as of the 2021.4 release. If this problem persists, please open a new issue 👍