-
-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Climate offline, temperature sensor still reports value #43897
Comments
So which integration is this bug report for? We can only target one integration per issue... |
I'd start with the ecobee integration. I know that is a problem. But I'm pretty sure it is in the NuHeat integration as well. So either both integrations copied the same code (and bug), or could it take place outside the integration? |
No, this behavior is defined by the integration itself. |
ecobee documentation |
There's probably a lot of good value in at least publishing an announcement about how users should re-add their integrations. This is my first real experience with HA, and it seems like some parts of the stack don't report errors back in a noticeable way, particularly when it comes to automations. The only way I knew it was as simple as re-adding the integration was finding this thread. Granted, the ecobee API is not intuitive and should probably offer some scheme for users to be able to continue to use existing apps -- but the UX here is pretty meh given that the underlying everything still technically works, but you need to do work to re-add it for existing setups to continue working. Is it possible to add something like this to release notes / changelogs / etc easily? |
@marthoc I've been looking in the code at
This would definitely cause the problem I'm seeing since when the ecobee is offline, it doesn't have a 'temperature' capability. The relevant code is here: async def async_update(self):
"""Get the latest state of the sensor."""
await self.data.update()
for sensor in self.data.ecobee.get_remote_sensors(self.index):
if sensor["name"] != self.sensor_name:
continue
for item in sensor["capability"]:
if item["type"] != self.type: # <-- If offline, there will be no 'temperature' / self.type
continue
self._state = item["value"]
break You'd probably need to add a: if self.type not in sensor["capability"]:
# Offline
self._state = math.nan # Can't set state to None It looks to me like this is generic code. It probably affects all the sensors in ecobee, and quite likely other components that copied this logic. If that's the case, this could be a big fix across many components that would need to be thought through. Definitely above my pay grade for a PR! |
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. |
@frenck (or someone else) - I think someone with good overview of the HA system and feature / bug roadmap should look into this. I do not need it for me, but if I'm right, then many or most integrations are publishing meaningfully incorrect data. It seems a pretty big and fundamental error, if I'm right. Someone should look into and either disprove, or put in the appropriate place on the roadmap. |
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. |
The problem
I have some thermostat devices - some ecobees and a Nuheat. They create
climate.*
andsensor.xxx_temperature
entities.When the thermostat is offline, the climate will properly show state==None. But the temperature sensor will continue to show the last valid value - which is definitely no longer valid. This means I'm relying on a value that is incorrect. Further, I can't, easily, just use the "current temperature" value of the climate entity in my use case. (In my case, I use a custom card that doesn't handle null values well.)
I think the proper behavior should be when offline, the sensor should read
None
, or maybenumpy.Nan
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
Additional information
If this is indeed a bug (and not a side effect of something needed or a design decision), if you point me a the likely solution, I'll try to fix and issue a PR.
The text was updated successfully, but these errors were encountered: