New Home Assistant 2023.7.1 Error "indicating it has a numeric value; however, it has the non-numeric value: '' (<class 'str'>)" #40
Unanswered
MarcoAVoegele
asked this question in
Q&A
Replies: 2 comments 4 replies
-
Try to append a int conversion
I would recommend this anyway for all templates that expect a number. I go even so far to control the value if something unexpected returns:
|
Beta Was this translation helpful? Give feedback.
2 replies
-
Thank you, did also not help... |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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:
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
Beta Was this translation helpful? Give feedback.
All reactions