I’m trying to get the value of a sensor sensor.victronzon into the value of this YAML code below. The value is a float and rounded when viewed in the developers toolkit.
alias: Handelen met energie - Handmatig ontladen snel
description: ""
trigger:
- platform: state
entity_id:
- input_button.handmatig_ontladen_snel
condition: []
action:
- device_id: 99323af3cb25907d241ed33a162afcea
domain: number
entity_id: 53825fb0c8d4bc917b04789caaf17c77
type: set_value
value: -3500
mode: single
I tried with ChatGPT to convert this but I got error’s like: not a valid value for dictionary value @ data[‘entity_id’]. Got None
This is the code i use:
alias: Handelen met energie - Handmatig ontladen snel + zon
description: ""
trigger:
- platform: state
entity_id:
- input_button.handmatig_ontladen_snel_zon
condition: []
action:
- device_id: 99323af3cb25907d241ed33a162afcea
domain: number
entity_id: 53825fb0c8d4bc917b04789caaf17c77
type: set_value
value: "{{ states('sensor.victronzon') | float }}"
mode: single