jazzyisj/unavailable-entities-sensor

Home Assistant 2023.5, package no longer loads

Closed this issue · 11 comments

With the upgrade to Home Assistant 2023.5, the package no longer loads with the following error in the logs:

ValueError: Sensor sensor.unavailable_entities has device class None, state class None unit entities and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: (<class 'str'>)

Apparently 2023.5.0 broke much, including (among many other things) Alexa device integrations. I am reverting to 2023.4.6 as I type...

@ciscoqid It has removed all entities exposure to Alexa. You just need to expose the ones you need to fix that issue.

I've raised the issue on the HA side as well: home-assistant/core#92635

guys pay attention that you don't have unit_of_measurement in your template. If you are, just delete it and reload the template.
My template had this line:

        unit_of_measurement: entities

After deleting it the templated loaded and works as expected.

@stickpin That worked for me, thank you!

@stickpin removing "unit_of_measurement" solved the loading issue.
Apparently I was trying to migrate from an older version with my modifications to the latest one (which doesn't have the unit_of_measurement) and it got put back in. Thank you!

Removing the unit of measurement didn't work for me, since I never had that line in it. When creating a Template Helper you're required to select a unit of measurement.

My error message reads:
"Sensor None has device class 'energy', state class 'None' unit 'kWh' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'template: - sensor: - name: "Netzbezug" state: 32.284299999999995' (<class 'str'>)"

@eisichwinter

When creating a Template Helper you're required to select a unit of measurement.

Only if you are also specifying a state_class. Both or none.

The error you have shown in the other comment is not from this template. You must have an error in another template somewhere that the device class was specified as energy.

That was the root cause for all this trouble:

Unfortunately I lost a bit of statistics because I can't use my former UoM anymore. Anyway glad I found this issue here.

Did anyone manage to restore the UoM somehow in this template sensor after HA Core 2023.5?