Automations.yaml suddenly corrupted by zwave.set_config_parameter

Does anyone have any ideas why a week after adding the following automation it should suddenly be rejected? I set it up, it does what I want. I have rebooted the controller several times. Today I tweaked a sensor snippet in sensors.yaml and when I reload HA (Hassbian on a Raspberry Pi 3) I had the following error:

Nov 19 21:32:14 hassbian2 hass[813]: 2019-11-19 21:32:14 ERROR (SyncWorker_0) [homeassistant.util.yaml.loader] while parsing a flow mapping
Nov 19 21:32:14 hassbian2 hass[813]:   in "/home/homeassistant/.homeassistant/automations.yaml", line 624, column 7
Nov 19 21:32:14 hassbian2 hass[813]: expected ',' or '}', but got '<scalar>'
Nov 19 21:32:14 hassbian2 hass[813]:   in "/home/homeassistant/.homeassistant/automations.yaml", line 628, column 7
Nov 19 21:32:14 hassbian2 hass[813]: 2019-11-19 21:32:14 ERROR (MainThread) [homeassistant.bootstrap] Error loading /home/homeassistant/.homeassistant/configuration.yaml: while parsing a flow mapping
Nov 19 21:32:14 hassbian2 hass[813]:   in "/home/homeassistant/.homeassistant/automations.yaml", line 624, column 7
Nov 19 21:32:14 hassbian2 hass[813]: expected ',' or '}', but got '<scalar>'
Nov 19 21:32:14 hassbian2 hass[813]:   in "/home/homeassistant/.homeassistant/automations.yaml", line 628, column 7

The automation is:

- alias: 'Set buzzer to  Fur Elise'
  trigger:
    platform: state
    entity_id: input_boolean.heater_controlled_by_thermostat
    to: 'on'
  action:
    service: zwave.set_config_parameter
    data_template: 
      {   # <------------------line 624
      "node_id": 5,
      "parameter": 6,
      "value": 'Fur Elise'
      "node_id": 5,
      "parameter": 7,
      "value": 'Alarm Music'
      }

Thank you for all advice!

i assuming you DON’T have a ā€˜#’ in your parameter settings ?

Because you don’t have a comma at the end of the ā€œvalueā€ line.

Thanks very much @anon43302295 for your speedy response - I must have knocked off the comma without realising it. And yes @Mutt you are correct the # was for indication purposes only.
Interestingly with the comma restored the error mentioned above goes away, but I noticed another error message which has not stopped HA reloading. It states:

Nov 19 23:23:38 hassbian2 hass[2071]: 2019-11-19 23:23:38 ERROR (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /home/homeassistant/.homeassistant/automations.yaml contains duplicate key "node_id". Check lines 624 and 627.
Nov 19 23:23:38 hassbian2 hass[2071]: 2019-11-19 23:23:38 ERROR (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /home/homeassistant/.homeassistant/automations.yaml contains duplicate key "parameter". Check lines 625 and 628.
Nov 19 23:23:38 hassbian2 hass[2071]: 2019-11-19 23:23:38 ERROR (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /home/homeassistant/.homeassistant/automations.yaml contains duplicate key "value". Check lines 626 and 629.

I had not realised one could not have more than one parameter changed at a time and when I tested this originally I only checked it had changed the parameter 6 and not the parameter 7.
I have split the parameters into two - service: sections and now have no error messages.

- alias: 'Set buzzer to  Volume to 1'
  trigger:
    platform: state
    entity_id: input_boolean.heater_controlled_by_thermostat
    to: 'on'
  action:
    - service: zwave.set_config_parameter
      data_template: 
        {
        "node_id": 5,
        "parameter": 6,
        "value": 'Fur Elise',
        }  
    - service: zwave.set_config_parameter
      data_template: 
        {
        "node_id": 5,
        "parameter": 7,
        "value": 'Alarm Music'
        }

Thank you for your help!

You still appear to be missing the comma off the second value line, unless you knocked that one off at the same time ?
I also, from my experience with these sirens, think you should have a small delay following any parameter setting to allow for comms propagation. 1 second works for me.
I also only use the alarm mode (not the alarm mode) as I switch the siren on and off, that way I only ever send 1 parameter, with 1 sec and then sound the siren.
Did you manage to get this to work without a delay ?

Your alias for this seems a bit astray from what it does too

Just curious, why are you using data_template without any template code?

It also ends up being a little simpler using YAML syntax instead of JSON. No commas to worry about.

- alias: 'Set buzzer to Volume to 1'
  trigger:
    platform: state
    entity_id: input_boolean.heater_controlled_by_thermostat
    to: 'on'
  action:
    - service: zwave.set_config_parameter
      data:
        node_id: 5
        parameter: 6
        value: 'Fur Elise'
    - service: zwave.set_config_parameter
      data: 
        node_id: 5
        parameter: 7
        value: 'Alarm Music'
1 Like

Apologies for the delay in replying, life getting in the way.
Thank you both for your observations and help.
@Mutt, the title and the trigger are both a bit random. I was playing with different bits of automation ideas and out of laziness didn’t change everything before publishing the coding on this forum.
I have managed to get the alarm to change from the Doorbell music setting to the Alarm music setting (Parameter 7) and change the Alarm music (Parameter 5) using the following:

- alias: 'Set buzzer to  Volume to 1'
  trigger:
    platform: state
    entity_id: input_boolean.heater_controlled_by_thermostat
    to: 'on'
  action:
    - service: zwave.set_config_parameter
      data: 
        node_id: 5
        parameter: 7
        value: 'Alarm music'
    - service: zwave.set_config_parameter
      data: 
        node_id: 5
        parameter: 5
        value: 'William Tell'

The setting before I triggered this automation was default Door bell music and the Alarm music was set to ā€˜Evacuation’. Before the automation was triggered the alarm played the music on the Door bell music. After the automation was triggered it played William Tell.

I haven’t tried setting up the automation to first change the parameters and then trigger the alarm, but if necessary I will put in the 1 second delay. Thank you for the tip.

And thank you @freshcoast. I used the date_template because that was in the example I came across. As you can see, I have removed the template bits and it runs fine.

Now I have got this concept working I will brush up the title and trigger!
Thanks very much to you both.

Yes, as was mine, but I went through the zwave manager and changed the parameter defaults
I don’t have to worry about most of that stuff any more, I just change the tune.