Sending value to number helper not working

Hello,

Im having trouble getting an automation to set the value of a number helper. Here is what it looks like. What i want to do here is send the battery level value to the number helper everytime there is a change.

alias: EV SOC
description: “”
trigger:

  • platform: state
    entity_id:
    • sensor.ioniq_ev_battery_level
      condition:
      action:
  • service: input_number.set_value
    target:
    entity_id: input_number.soc
    data:
    value: sensor.ioniq_ev_battery_level
    mode: single

Please follow the community guideline and properly format your code.

As shown, your automation is trying to set the string “sensor.ioniq_ev_battery_level” to an input number which is not valid. If you want to set the value of the sensor’s state to the input number, you need to use a template:

  - service: input_number.set_value
    target:
      entity_id: input_number.soc
    data:
      value: "{{ states('sensor.ioniq_ev_battery_level') }}"

Thank you very much, that did the trick! Im a real noob with this kind of stuff and ive spent nearly 6h trying different things…

What are you trying to achieve by mirroring the sensor to an input number?