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

Group sensor warnings: Unable to use state. Only numerical states are supported, entity sensor.xxx with value unavailable excluded from calculation #87924

Closed
edwardtfn opened this issue Feb 12, 2023 · 10 comments · Fixed by #102828

Comments

@edwardtfn
Copy link

The problem

The new sensor group is awesome, so I migrated a bunch of my template sensors (usually just sum up values of multiple power sensors, or taking the average temperature at home, etc.) to groups and have used the option to ignore non numeric, as a sensor might go out for some reason and I still want to calculate the results taking in account only the other sensors.

However with this option a warning is registered in the log every time one of the sensors inside a group is not numeric (unavailable), which means lots of new warnings during the startup.

If I already selected to ignore non numeric values that means I know that situation will happen and don't need a warning for that.

What version of Home Assistant Core has the issue?

2023.2.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

Group

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

sensor:
  - name: Home - Average room temperature
    platform: group
    unique_id: 55b92afc-918b-4b8b-a98c-9cfbcf788b0a
    unit_of_measurement: "°C"
    device_class: temperature
    ignore_non_numeric: true
    type: mean
    entities:
      - sensor.bathroom_thermostat_current_temperature
      - sensor.bedroom_hygrometer_temperature
      - sensor.corridor_air_quality_temperature
      - sensor.guest_room_thermostat_current_temperature
      - sensor.hall_panel_temperature
      - sensor.kitchen_thermostat_current_temperature
      - sensor.living_room_thermostat_current_temperature
      - sensor.office_hygrometer_temperature

Anything in the logs that might be useful for us?

Logger: homeassistant.components.group.sensor
Source: components/group/sensor.py:315 
Integration: Group (documentation, issues) 
First occurred: 07:59:02 (12 occurrences) 
Last logged: 07:59:02

Unable to use state. Only numerical states are supported, entity sensor.kitchen_total_power with value unavailable excluded from calculation
Unable to use state. Only numerical states are supported, entity sensor.laundry_total_power with value unavailable excluded from calculation
Unable to use state. Only numerical states are supported, entity sensor.living_room_total_power with value unavailable excluded from calculation
Unable to use state. Only numerical states are supported, entity sensor.media_centre_total_power with value unavailable excluded from calculation
Unable to use state. Only numerical states are supported, entity sensor.office_total_power with value unavailable excluded from calculation


Logger: homeassistant.components.group.sensor
Source: components/group/sensor.py:288 
Integration: Group (documentation, issues) 
First occurred: 07:59:04 (1 occurrences) 
Last logged: 07:59:04

Unable to use state. Only numerical states are supported, entity sensor.hall_panel_temperature with value unavailable excluded from calculation

Additional information

No response

@home-assistant
Copy link

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 Change the title of 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.

(message by CodeOwnersMention)


group documentation
group source
(message by IssueLinks)

@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.

@edwardtfn
Copy link
Author

That was not solved with the latest version.

@github-actions github-actions bot removed the stale label May 13, 2023
@serlinGi
Copy link

same warning for me;
similar situation after migrating my temperature sensor assemblies for averaging

@Elkiff71
Copy link

Same problem in version 2023.7
Thx

@jcd420
Copy link

jcd420 commented Aug 25, 2023

What i did as fix. Is create in a template, and give the sensor a default value:

- name: "vSuit1TurnPCon"
  unique_id: "binary_sensor.vsuit1turnpcon"
  device_class: "power"
  delay_off: "0:01:00"
  state: >
    {{ states('sensor.espsuit1_distance_detection_cm') | float (500) < 265 }}

@carabao72
Copy link

Logger: homeassistant.components.group.sensor
Source: components/group/sensor.py:331
Integration: Groupe (documentation, issues)
First occurred: 06:53:49 (5 occurrences)
Last logged: 06:53:49

Unable to use state. Only numerical states are supported, entity sensor.alarme_incendie_cave_battery with value unknown excluded from calculation
Unable to use state. Only numerical states are supported, entity sensor.alarme_incendie_cuisine_battery with value unknown excluded from calculation
Unable to use state. Only numerical states are supported, entity sensor.alarme_incendie_buanderie_battery with value unknown excluded from calculation
Unable to use state. Only numerical states are supported, entity sensor.alarme_incendie_palier_1_battery with value unknown excluded from calculation
Unable to use state. Only numerical states are supported, entity sensor.alarme_incendie_palier_2_battery with value unknown excluded from calculation

Version | core-2023.10.5

@mill1000
Copy link
Contributor

I've got a PR lined up to fix this issue #102828

@DarkWarden85
Copy link

I have this issue as well. Thanks @mill1000 for creating a PR. Sadly no one has reviewed it yet, hope this will happen soon.

@olympia
Copy link

olympia commented Dec 27, 2023

Same here; it would be great if someone from HA Team could review the PR.

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

Successfully merging a pull request may close this issue.

8 participants