home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.84k stars 29.54k forks source link

sensor."movile_device"_battery_level - The state class of this entity, is not supported. #117750

Open Veletax opened 3 months ago

Veletax commented 3 months ago

The problem

According HA warning, for then entity sensor."mobile_device"_battery_level, Statistics cannot be generated until this entity has a supported state class. The Statistics unit is "%" of battery. In my case the entity name is: sensor.sm_x200_battery_level.

According instruccions from HA: "If this state class was provided by an integration, this is a bug. Please report an issue."

What version of Home Assistant Core has the issue?

core-2024.5.4

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

Mobile App

Link to integration documentation on our website

https://www.home-assistant.io/integrations/mobile_app

Diagnostics information

image

image

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 3 months ago

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)

dshokouhi commented 2 months ago

can you check that you are on the latest version of the android app?

DeepCoreSystem commented 1 month ago

@dshokouhi I have the same problem as @Veletax

It happens with our two android mobile phones grafik

I am using the Android App version 2024.6.1-full and this is the system information of Home Assistant:

`

Version core-2024.6.4
Installation type Home Assistant OS
Development false
Supervisor true
Docker true
User root
Virtual environment false
Python version 3.12.2
Operating system family Linux
Operating system version 6.6.33-haos
CPU architecture x86_64
Timezone Europe/Berlin
Configuration directory /config

`

DeepCoreSystem commented 1 month ago

Now it gets spooky ... I found in an other issue the quick fix to add the following under the key homeassistant

customize:
  sensor.cat_s75_battery_level:
    state_class: measurement

Restarted Home Assistant, but not the companion app ... and the "error" is gone It was gone for both mobile phones, but as I went back to take a screenshot, the mobile phone of my wife errored again

grafik