Intermittent Script Error 'type'

This one has been driving me nuts for the last few days, hopefully, someone notices something I haven’t.

I run this script to set thermostat values for cooling and heating. it works only the first time the script is run, and then not again until I refresh scripts, or save it again with no changes.

Error log:

Logger: homeassistant.components.script.downstairs_climate_test
Source: components/zwave_js/device_action.py:244
Integration: Script (documentation, issues)
First occurred: March 17, 2022, 8:57:30 AM (12 occurrences)
Last logged: 9:49:02 AM

Downstairs climate set: Choose at step 1: choice 1: Error executing script. Unexpected error for device at pos 1: 'type'
Downstairs climate set: Error executing script. Unexpected error for choose at pos 1: 'type'
Downstairs climate set: Choose at step 1: choice 2: Error executing script. Unexpected error for device at pos 1: 'type'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 367, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 578, in _async_device_step
    await device_action.async_call_action_from_config(
  File "/usr/src/homeassistant/homeassistant/components/device_automation/action.py", line 68, in async_call_action_from_config
    await platform.async_call_action_from_config(hass, config, variables, context)
  File "/usr/src/homeassistant/homeassistant/components/zwave_js/device_action.py", line 244, in async_call_action_from_config
    action_type = service = config.pop(CONF_TYPE)
KeyError: 'type'

Script

alias: Downstairs climate set
sequence:
  - choose:
      - conditions:
          - condition: state
            entity_id: input_boolean.sleep
            state: 'on'
        sequence:
          - device_id: 4030df90ad00ed2d6358f379b5f9e597
            domain: zwave_js
            type: set_value
            command_class: 67
            property: setpoint
            value: '65'
            property_key: '1'
            endpoint: '0'
          - device_id: 4030df90ad00ed2d6358f379b5f9e597
            domain: zwave_js
            type: set_value
            command_class: 67
            property: setpoint
            value: '71'
            property_key: '2'
            endpoint: '0'
      - conditions:
          - condition: state
            entity_id: input_boolean.awake
            state: 'on'
        sequence:
          - device_id: 4030df90ad00ed2d6358f379b5f9e597
            domain: zwave_js
            type: set_value
            command_class: 67
            property: setpoint
            value: '76'
            property_key: '2'
            endpoint: '0'
          - device_id: 4030df90ad00ed2d6358f379b5f9e597
            domain: zwave_js
            type: set_value
            command_class: 67
            property: setpoint
            value: '72'
            property_key: '1'
            endpoint: '0'
      - conditions:
          - condition: state
            entity_id: input_boolean.evening
            state: 'on'
        sequence:
          - device_id: 4030df90ad00ed2d6358f379b5f9e597
            domain: zwave_js
            type: set_value
            command_class: 67
            property: setpoint
            value: '73'
            property_key: '2'
            endpoint: '0'
          - device_id: 4030df90ad00ed2d6358f379b5f9e597
            domain: zwave_js
            type: set_value
            command_class: 67
            property: setpoint
            value: '68'
            property_key: '1'
            endpoint: '0'
      - conditions:
          - condition: state
            entity_id: input_boolean.away
            state: 'on'
        sequence:
          - device_id: 4030df90ad00ed2d6358f379b5f9e597
            domain: zwave_js
            type: set_value
            command_class: 67
            property: setpoint
            value: '65'
            property_key: '1'
            endpoint: '0'
          - device_id: 4030df90ad00ed2d6358f379b5f9e597
            domain: zwave_js
            type: set_value
            command_class: 67
            property: setpoint
            value: '80'
            property_key: '2'
            endpoint: '0'
    default: []
mode: restart
1 Like

I have exactly the same problem, also posted a thread on this forum. Have you found a solution yet? Yesterday we had a short power outage and I noticed that after that the script worked again for one time. So a reboot of the systeem seems to reset the problem. But I’d rather not reset the system each day …

I have this same problem.
I have an automation that toggles a ZEN77 using button presses on either of two ZEN32’s button 1.
The ZEN77 status change then triggers one of two automations that set the status of LEDs on the ZEN32 buttons.

Both LED change automations successfully run the first time since they have been saved, then fail every time thereafter with the ‘type’ error.
Is there some workaround? Can I edit this directly in YAML? Is it an editor bug?

Thanks!

I never did really figure out what it was other than it had to do with the Z-wave device calls to the honeywell thermostat. I switched to service calls and haven’t had the issue anymore.