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

Computed sensor does not become unavailable, when the underlying real sensor becomes unavailable. #345

Open
darrenfreeman opened this issue Dec 17, 2023 · 6 comments

Comments

@darrenfreeman
Copy link

I have some ZigBee temperature/humidity sensors that are on vehicles, and so they become unavailable fairly often. Unfortunately, when this happens, the heat index and the dew point continue to report valid states. (I assume the other computed values would behave similarly.)

This can be problematic when using the value in an automation, for example running an air-conditioner until a room becomes very cold.

@darrenfreeman
Copy link
Author

Another downstream problem caused by this - when combining the values in e.g. max/min helpers, they completely screw up the behaviour of the helper, when some sensors are unavailable.

@rautesamtr
Copy link
Collaborator

Sure we could make them unavailable when the state of input sensors is unknown over unavailable. If we do this we probably should also show a notification in the UI so the user knows why this happens.

@dolezsa what do you think?

@darrenfreeman
Copy link
Author

I don't think a notification is the correct behaviour, none of the core helpers do this.

Also, all sensors are unavailable during HA startup. If the user wanted a notification, they should be looking at the integration that provides the physical sensor, as Thermal Comfort can't tell the reason why the sensor is unavailable.

@dolezsa
Copy link
Owner

dolezsa commented Dec 30, 2023

Of course, I agree with you, rautesamtr, this is more than logical. 👍

@dolezsa
Copy link
Owner

dolezsa commented Dec 30, 2023

I was wondering that the notification might be reasonable in a way that the sensor value would indeed be 'unavailable,' but we would communicate the reason in an attribute, for example, that the temperature sensor is not accessible...

@darrenfreeman
Copy link
Author

I'm looking forward to testing a fix, I have sensors coming and going all the time. The good news is I think it does go unavailable, if you fully restart HA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants