spali/go-rscp

New Home Assistant 2023.7.1 Error "indicating it has a numeric value; however, it has the non-numeric value: '' (<class 'str'>)"

MarcoAVoegele opened this issue · 0 comments

Hi Spali,
I just updated the Home Assistant version and now it does no longer work:
"
sensor:

  • platform: command_line
    command: "/config/packages/e3dc/e3dc.sh"
    name: e3dc
    command_timeout: 1
    scan_interval: 1
    json_attributes:

    • result
      value_template: "OK"
  • platform: template
    sensors:
    e3dc_grid_power:
    friendly_name: E3DC Netz
    device_class: power
    value_template: "{{ state_attr('sensor.e3dc', 'result')['EMS_POWER_GRID'] }}"
    unit_of_measurement: W
    "
    Home Assistant Log:
    "
    ...
    ValueError: Sensor sensor.e3dc_grid_power has device class 'power', state class 'None' unit 'W' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: '' (<class 'str'>)
    "
    Do you have any suggestions?

Thank you,

Marco