Graph data


is there a way to change the History to a graph

  • name: “Amps on Inverter (12V)”
    state: >
    {{ ( states(‘sensor.v_3100_inverter_output_current’) | float / 12 ) | round(1) }}


Please format your included config for the forum in future.

Add a unit_of_measurement to your sensor config.

Sensors without a unit_of_measurement are treated as text sensors. Sensors with a unit_of_measurement are treated as numeric.

Also do not forget to include a default for your float filter. This will prevent errors if your inverter sensor is unavailable. You can also guard against it displaying this default value with an availability template:

- name: "Amps on Inverter (12V)"
  unit_of_measurement: "A" # or "Amps" if you prefer.
  state: >
    {{ ( states('sensor.v_3100_inverter_output_current') | float(0) / 12 ) | round(1) }}
  availability: >
    {{ ( states('sensor.v_3100_inverter_output_current') | is_number }}

In this case if your inverter sensor is not a number (e.g. unknown, unavailable, none) it will show as “unknown”.

This is particularly important for energy sensors used in the energy dashboard, but is also best practice for other sensors.

1 Like