home-assistant / home-assistant/core

Melcloud integration- Reports wrong energy value for the total consumption

Open
#110,643 84 comments 1 reaction 0 assignees View on GitHub
integration: melcloud
Dominant language
Python
Stars
90.5k
Forks
38.6k
Avg merge
1d 3h
Merged PRs (30d)
597

Description

### The problem

For about a week now, since the issue where MelCloud started to impose a rate limiting (see https://github.com/home-assistant/core/issues/109728) there's been other issues.

First of all, the daily consumption is gone. I've searched a bit and it looks like it was a deliberate move to get less calls for the polling. CF https://github.com/home-assistant/core/commit/5521a3986699b8af6dbc34bd422f7b9583b6ab8f. I don't consider this a big issue, it's easy enough to recreate with a helper using the total consumption.

Now, what's more of a problem at the moment, is that since this all started (~ last week), the total consumption appears to be wrong. It's a lot lower than what it should be. To give an idea, it's roughly the same weather since last week and you can look at the break down of my consumption in the following picture. The orange bar is the consumption of the heatpump, notice how it's super low for a week now:

![image](https://github.com/home-assistant/core/assets/4950209/201d74c6-2560-48f0-ba83-70a32e823f5a)

Here are some value comparison between cloud data from the MelCloud app and my HA data, in kWh:

| Date | HA | MelCloud | Ratio |
| -------- | --- | -------- | ----- |
| 14/02/24 | 2.0 | 14.4 | 7.20 |
| 13/02/24 | 2.4 | 14.9 | 6.20 |
| 12/02/24 | 1.9 | 11.5 | 6.05 |
| 11/02/24 | 1.8 | 13.8 | 7.66 |

Looking at the ratio, it look like it's always between ~6 and ~8 times less on HA than MelCloud.

As the polling period has been extended, if there isn't a poll made right before midnight, I'm guessing we could have some of the HA value slightly different for the day compared to MelCloud, which might explain that we're not getting the same ratio. Or it's totally unrelated, unsure.

While the main feature to manage the heat pump temperature is working again (which is great, thanks for reacting so quickly!), it's still quite problematic in my case as I was hoping to get good quality stats after buying the heat pump right when winter started to be able to make long term stats difference pre heat pump VS now (not using HA, using Grafana but it gets the data from HA still).

I have looked for similar issues and found this one https://github.com/home-assistant/core/issues/109864 but I think it was wondering about the daily consumption and as stated at the beginning of this issue, it was a deliberate move and it can be fixed easily so this issue is really about fixing the total consumption.

I don't get to create loads of issue on HA, so I'll take this one to say a massive thank you for the work you're doing and I'm quite impressed with the pace at which HA ships new feature. Top 3 of my favourite open source projects for sure.

### What version of Home Assistant Core has the issue?

2024.2.1

### What was the last working version of Home Assistant Core?

_No response_

### What type of installation are you running?

Home Assistant Container

### Integration causing the issue

MelCloud

### Link to integration documentation on our website

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

### Diagnostics information

Not sure it's needed in that case but let me know otherwise

### Example YAML snippet

_No response_

### Anything in the logs that might be useful for us?

```txt
I'm afraid not
```

### Additional information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the MelCloud integration and its integration documentation, then compare the reported Home Assistant total-consumption values with the corresponding MelCloud cloud data. Investigate how the extended polling period affects total consumption; done means the integration reports values consistent with MelCloud without restoring the removed daily-consumption behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.