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

Ignore unavailable #2

Closed
point-4ward opened this issue Sep 12, 2019 · 5 comments
Closed

Ignore unavailable #2

point-4ward opened this issue Sep 12, 2019 · 5 comments
Labels
enhancement New feature or request.

Comments

@point-4ward
Copy link

Is your feature request related to a problem? Please describe.

Yes, if one of the entities goes unavailable, the sensor output is 'unknown'

Describe the solution you'd like

If I have 5 sensors and one goes offline, ignore the offline one and give me the average reading of the remaining 4.

Describe alternatives you've considered

Using a template sensor ignores the unavailable entity, but of course treats it as zero, which skews the average for the remaining sensors.

@Limych Limych added the enhancement New feature or request. label Sep 13, 2019
@Limych
Copy link
Owner

Limych commented Sep 14, 2019

Does the sensor write anything to the logs when one of the sources is unavailable? I would like to see the logs. This will greatly accelerate the work.

@alwashe
Copy link

alwashe commented Sep 17, 2019

this would be great, like in the min_max platform, if the state of sensors are unknown pls ignore them.

Now: if one sensors state is unknown the average value is also unknown.

@point-4ward
Copy link
Author

@Limych

2019-09-23 10:15:19 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.test_avg_temp fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 261, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 439, in async_device_update
    await self.async_update()
  File "/config/custom_components/average/sensor.py", line 212, in async_update
    'Unable to find an entity called {}'.format(entity_id))
homeassistant.exceptions.HomeAssistantError: Unable to find an entity called sensor.bathroom_temperature

Limych added a commit that referenced this issue Sep 23, 2019
@Limych
Copy link
Owner

Limych commented Sep 23, 2019

@Limych Limych closed this as completed Sep 25, 2019
Limych pushed a commit that referenced this issue Mar 2, 2021
Limych added a commit that referenced this issue Mar 2, 2021
…ache-v2.1.4

Bump actions/cache from v2 to v2.1.4
@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

3 participants