Automation: Message malformed: extra keys not allowed @ data['0']

Hi,
I got a problem with a automation. I get the error message Message malformed: extra keys not allowed @ data[‘0’]

This is my first YAML script and I have no clue what is wrong.

- alias: copy value 
  trigger:
    platform: numeric_state
    entity_id: sensor.smart_meter_63a_power_real
    above: 200
  action:
    - service: input_number.set_value
      entity_id: number.delta_max_280560_ac_charge_speed
      data: "{{ (sensor.smart_meter_63a_power_real | float) * -1 }}"

try:

"{{ (states('sensor.smart_meter_63a_power_real') | float) * -1 }}"`

The value parameter is missing, compare with Developer Tools → Services

Thank you. I got it working with the following:

alias: copy value
trigger:
  - platform: state
    entity_id:
      - sensor.smart_meter_63a_power_real
condition: []
action:
  - service: number.set_value
    entity_id: number.delta_max_280560_ac_charge_speed
    data:
      value: >-
        {{ (states('sensor.smart_meter_63a_power_real') | float | round(1)) * -1 }}

I added condition and it was working.

For future reference: It doesn’t matter wether you add condition: [] or not.

I tried without condition: [] and it worked.
Thank you.

Hi guys
I have the same problem and can’t seem to figure it out. Can someone help please :slightly_smiling_face:

You have 2 automations in one.