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
71.13k stars 29.8k forks source link

Some sensor groups not loading after restarts since 2024.8 #124309

Open TravisEz13 opened 3 weeks ago

TravisEz13 commented 3 weeks ago

The problem

Since 2024.08, when I restart, two sensors groups fail to load. One is the median of several sensors and the other is the statistical range. I’ve waited at least an hour with no luck. Editing the sensor resolves the issue temporarily.

What version of Home Assistant Core has the issue?

Core-2024.8.2

What was the last working version of Home Assistant Core?

Core-2024.7.4

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

I’m not sure how to get the diagnostic data and yaml for a sensor group

Anything in the logs that might be useful for us?

2024-08-19 12:21:12.497 WARNING (MainThread) [homeassistant.components.min_max.sensor] Units of measurement do not match for entity sensor.house_teml

Additional information

No response

mib1185 commented 3 weeks ago

Please show us the configuration of these groups in question and als the state details of each grouped entity from the developer tools states tab, thx 👍

TravisEz13 commented 3 weeks ago

The main one that is failing is configured like this:

image

I don't think I can show you the state of all the group entities when it goes into the bad state because that is when I restart home assistant, but here are the current states. If I make any configuration changes, even just a change to the precision, to the group entity, it will resolve the issue after the grouped entities are in a known state.

image image image image
mib1185 commented 3 weeks ago

it will resolve the issue after the grouped entities are in a known state.

i think you encounter the documented behavior of sensor groups

home-assistant[bot] commented 3 weeks ago

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

Code owner commands Code owners of `group` 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 group` 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)


group documentation group source (message by IssueLinks)

TravisEz13 commented 3 weeks ago

Before 2024.8 the sensor would go back automatically, now when it gets in this state during startup, it gets stuck. For all the types that have ignore_non_numeric in the GUI, I added that, and it resolved the issue. Is there a simple way to change these to YAML or do I have to completely recreate them?

TravisEz13 commented 3 weeks ago

I recreated the main sensor I needed in YAML, the following and it works. I confirmed that adding ignore_non_numeric: true is what make it work and I can't find that option in the GUI.

sensor:
  - platform: group
    name: "Median Home Temp"
    device_class: temperature
    type: median
    unique_id: house_teml
    ignore_non_numeric: true
    entities:
      - sensor.living_room_temperature
      - sensor.master_temperature
      - sensor.office_temperature
      - sensor.wellness_room_temp_average
mib1185 commented 3 weeks ago

image

you have this option available on the edit screen

TravisEz13 commented 2 weeks ago

This option does not show up for me if the type is median or statistical range

mib1185 commented 1 week ago

This option seems to be available only on the edit form, but not on the create form for this sensor group helpers