Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shelly H&T, Flood Sensor - The state class '' of this entity is not supported. #98770

Closed
jazzyisj opened this issue Aug 21, 2023 · 18 comments
Closed

Comments

@jazzyisj
Copy link

The problem

Shelly H&T and Flood sensors both have entities where the state_class does not seem to be defined.

image

What version of Home Assistant Core has the issue?

v2023.8.3

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

Shelly

Link to integration documentation on our website

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

Diagnostics information

config_entry-shelly-f464401981e4379df6e61cd7ddefc896.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @balloob, @bieniu, @thecode, @chemelli74, @bdraco, mind taking a look at this issue as it has been labeled with an integration (shelly) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of shelly 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 shelly Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


shelly documentation
shelly source
(message by IssueLinks)

@mib1185
Copy link
Contributor

mib1185 commented Aug 24, 2023

Hi @jazzyisj
please prove the details of these entities from "Developer Tools" -> "States".
I've two H&T gen 1 without any problems.

@jazzyisj
Copy link
Author

I've just gone back to check again and I'm now down to just one entity that displays the statistics error. No idea what happened with the other 3, I haven't changed anything other than update to 2023.8.4 but that should be irrelevant.

This remaining entity is from a Shelly Flood sensor.

image image

Here's one of the other entities that displayed the error but now does not. The state class is now defined.
image

@mib1185
Copy link
Contributor

mib1185 commented Aug 25, 2023

@jazzyisj please provide the diagnostic data for the flood sensor

@julius975 your issue seems to be different, please open an own issue report for this

@jazzyisj
Copy link
Author

jazzyisj commented Aug 25, 2023

@chemelli74
Copy link
Contributor

I think this issue is somehow linked to sleeping devices; when online is all fine, when they are sleeping then you can get the warning.

Simone

@jazzyisj
Copy link
Author

@chemelli74
Very possible! They problematic devices have all been battery powered and do seem to come and go. At the moment I happen to have no statistics entities with the error message.

Those sensors should be retaining the state class even when the device is sleeping similar to the device class and unit of measurement though no?

@bieniu
Copy link
Member

bieniu commented Aug 26, 2023

@jazzyisj Could you please go to /config/.storage/core.restore_state, search for sensor.kitchen_floor_temperature and show us a screenshot with entry for this entity.
It should look like this:

obraz

@jazzyisj
Copy link
Author

    {
      "state": {
        "entity_id": "sensor.kitchen_floor_temperature",
        "state": "21.5",
        "attributes": {
          "unit_of_measurement": "°C",
          "device_class": "temperature",
          "friendly_name": "Kitchen Floor Temperature"
        },
        "last_changed": "2023-08-26T14:59:02.972964+00:00",
        "last_updated": "2023-08-26T14:59:02.972964+00:00",
        "context": {
          "id": "01H8S5P3NWH86Y6ZVP3QG1ADH4",
          "parent_id": null,
          "user_id": null
        }
      },
      "extra_data": {
        "native_value": 21.5,
        "native_unit_of_measurement": "°C"
      },
      "last_seen": "2023-08-26T14:59:18.026376+00:00"
    },

@bieniu
Copy link
Member

bieniu commented Aug 26, 2023

As I suspected, there is no state_class here. Could you please remove this device from HA and configure it once again?

@jazzyisj
Copy link
Author

Here is the same entry from core.restore_state for that same device when it is not showing a statistics error on the dev tools page. The state class is defined. I have not removed and reinstalled it (yet). The error messages are appearing and disappearing randomly. This same issue is happening with several Shelly devices, all battery powered.

I will reinstall the device now.

    {
      "state": {
        "entity_id": "sensor.kitchen_floor_temperature",
        "state": "22.12",
        "attributes": {
          "state_class": "measurement",
          "unit_of_measurement": "°C",
          "device_class": "temperature",
          "friendly_name": "Kitchen Floor Temperature"
        },
        "last_changed": "2023-08-26T21:16:59.735574+00:00",
        "last_updated": "2023-08-26T21:16:59.735574+00:00",
        "context": {
          "id": "01H8SVA4YQDX51XM5R187FMT82",
          "parent_id": null,
          "user_id": null
        }
      },
      "extra_data": {
        "native_value": 22.12,
        "native_unit_of_measurement": "°C"
      },
      "last_seen": "2023-08-27T02:42:03.512023+00:00"
    },

@jazzyisj
Copy link
Author

I have removed and reinstalled the Shelly flood device. The error has reappeared.
image

@jazzyisj
Copy link
Author

Maybe this isn't just a Shelly issue. Just noticed this for a sensor from another integration.
image

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 1, 2024
@jazzyisj
Copy link
Author

jazzyisj commented Jan 2, 2024

Still an issue as of v2024.1.0.b3

image

@tomlut
Copy link

tomlut commented Jan 7, 2024

You let this go stale jazzyisj. Unless a dev opens it again you will have to open a new issue.

@bdraco
Copy link
Member

bdraco commented Jan 9, 2024

#107530 is effectively the same issue

@jazzyisj
Copy link
Author

@tomlut Thanks for the heads up Tom! Sounds like they know about the issue, so I'll just sit tight and wait for a fix.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants