jeroenterheerdt / HAsmartirrigation

Smart Irrigation custom component for Home Assistant
MIT License
301 stars 47 forks source link

Error Message "Message malformed: extra keys not allowed @ data['0']" When Implementing Provided Example Automations #358

Open xNoVoSx opened 2 weeks ago

xNoVoSx commented 2 weeks ago

What happened?

config_entry-smart_irrigation-f8cb1dfbb1ddaa9c2cc0aac6aa5458ba.json

Hello,

I'm receiving the error message "Message malformed: extra keys not allowed @ data['0']" when attempting to implement the provided example automations. I apologize for the inconvenience, but I'm new to Home Assistant and need assistance in resolving this issue.

- alias: Smart Irrigation
  description: 'Start Smart Irrigation at 06:00 and run it only if the adjusted_run_time is >0 and run it for precisely that many seconds'
  trigger:
  - at: 06:00
    platform: time
  condition:
  - above: '0'
    condition: numeric_state
    entity_id: sensor.smart_irrigation_garten_vorne
  action:
  - data: {}
    entity_id: switch.irrigation_tap1
    service: switch.turn_on
  - delay:
      seconds: '{{states("sensor.smart_irrigation_garten_vorne")}}'
  - data: {}
    entity_id: switch.irrigation_tap1
    service: switch.turn_off
  - data: {}
    service: smart_irrigation.reset_bucket
    target:
      entity_id: sensor.smart_irrigation_garten_vorne

How to reproduce

  1. Navigate to the Automations section in Home Assistant.
  2. Create a new automation using the provided example automation.
  3. Attempt to save or activate the automation.
  4. Observe the error message "Message malformed: extra keys not allowed @ data['0']" being displayed.
- alias: Smart Irrigation
  description: 'Start Smart Irrigation at 06:00 and run it only if the adjusted_run_time is >0 and run it for precisely that many seconds'
  trigger:
  - at: 06:00
    platform: time
  condition:
  - above: '0'
    condition: numeric_state
    entity_id: sensor.smart_irrigation_garten_vorne
  action:
  - data: {}
    entity_id: switch.irrigation_tap1
    service: switch.turn_on
  - delay:
      seconds: '{{states("sensor.smart_irrigation_garten_vorne")}}'
  - data: {}
    entity_id: switch.irrigation_tap1
    service: switch.turn_off
  - data: {}
    service: smart_irrigation.reset_bucket
    target:
      entity_id: sensor.smart_irrigation_garten_vorne

Relevant log output

No response

Which version are you running?

v2024.3

Diagnostics file

Additional information

No response

jeroenterheerdt commented 2 weeks ago

Remove the data:{} lines. Those are not needed unless you actually need to pass in data....