core icon indicating copy to clipboard operation
core copied to clipboard

Repair "The entity no longer has a state class"

Open CMOS3 opened this issue 1 year ago • 8 comments

The problem

Since Core 2024.10.0 I get a persisting repair hint "sensor.pixel_8_battery_level no longer has a state class", reported by Sensor. The action button "Delete" in the modal screen (popup) doesn't have any effect.

What version of Home Assistant Core has the issue?

2024.10.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

CMOS3 avatar Oct 03 '24 15:10 CMOS3

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (mobile_app) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of mobile_app can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign mobile_app Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


mobile_app documentation mobile_app source (message by IssueLinks)

home-assistant[bot] avatar Oct 03 '24 18:10 home-assistant[bot]

Having the Same issue, multiple entities are reporting " no longer has a state class.

See attachement Screenshot_20241004_000754_Home Assistant

TheRed-E avatar Oct 03 '24 22:10 TheRed-E

I am having the same issue after updating to 2024.10.0

Also only seems to occur with Mobile App connected sensors.

Pressing "Delete" even multiple times does not clear the repair. Screenshot_20241003_182138 Screenshot_20241003_182321

gjx86 avatar Oct 03 '24 22:10 gjx86

Are those deleted devices by any chance?

joostlek avatar Oct 03 '24 22:10 joostlek

The Pixel 6 Pro is still connected and the entity names match the repair messages.

So short answer no they are not deleted.

Screenshot_20241003_184029

gjx86 avatar Oct 03 '24 22:10 gjx86

UPDATE: After a few restarts the issue appears to have resolved itself.

The repair messages are now gone, All I did was click delete on each once and then restarted a few times, however I don't know what actually resolved the issue.

gjx86 avatar Oct 04 '24 04:10 gjx86

UPDATE: in my case I also hit "delete" and restarted HA, the messages disappeared. The entities related to the devices are still available, so no info was deleted from what I can see now. I still think this is unwanted/unexpected behavior from HA, since the related entities are still in use, and not from deleted devices. (as per @joostlek suggestion)

TheRed-E avatar Oct 04 '24 06:10 TheRed-E

@joostlek For me the entity points to an old sensor that is not in use anymore. Some time ago I had 2 servers on my mobile app: one for an old installation and a second for my current installation. Back then I deleted the unused server from the app, but all sensor entities remained. So now I have 2 entities for the same sensors:

Screenshot 2024-10-04 114428

The red one is the old and inactive sensor, the green one is the current active sensor.

I tried disabling the inactive entity, but the repair notification still persists.

CMOS3 avatar Oct 04 '24 09:10 CMOS3

Since Core 2024.10.1 the issue seems to be resolved.

CMOS3 avatar Oct 11 '24 06:10 CMOS3