wo5wa5i
(Wo5wa5i)
1
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 }}"`
pedolsky
(Pedolsky)
3
The value
parameter is missing, compare with Developer Tools → Services
wo5wa5i
(Wo5wa5i)
4
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.
pedolsky
(Pedolsky)
5
For future reference: It doesn’t matter wether you add condition: []
or not.
wo5wa5i
(Wo5wa5i)
6
I tried without condition: [] and it worked.
Thank you.
Lbaben
(Babe-N)
7
Hi guys
I have the same problem and can’t seem to figure it out. Can someone help please 
pedolsky
(Pedolsky)
8
You have 2 automations in one.