core icon indicating copy to clipboard operation
core copied to clipboard

Add cooling consumption and cooling temperatures

Open x4N70pHyLL opened this issue 1 year ago • 11 comments

The problem

Hello, as it's finally summer, I am using my heat pump for cooling, but there is not value for the energy consumption for cooling. Can we add this?

Currently, there is:

  • Overall consumption
  • Heating consumption
  • hot water consumption

Cooling consumption is measured and included in "Overall consumption", but not in heating. That leads me to the assumption that there should be an attribute for "Cooling Consumption" in the API.

What version of Home Assistant Core has the issue?

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

Viessmann ViCare

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

x4N70pHyLL avatar Jun 25 '24 08:06 x4N70pHyLL

Hey there @cfenner, mind taking a look at this issue as it has been labeled with an integration (vicare) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of vicare can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign vicare Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


vicare documentation vicare source (message by IssueLinks)

home-assistant[bot] avatar Jun 25 '24 08:06 home-assistant[bot]

You can check if the data point is in the api response in the diagnostic information yourself. I would assume that heating actually means climate and there is no dedicated cool. At least I did not noticed such in the past in heat pump api dumps.

What is the ViCare app telling your about this?

CFenner avatar Jun 25 '24 08:06 CFenner

I would assume that heating actually means climate and there is no dedicated cool. I would not assume that as the energy used for cooling is not included but shows up in "Overall consumption"

App supports that assumption

IMG_735BD0C71857-1

API has:

https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/heating.circuits.0.operating.modes.active where it states that the active mode is cooling (is not reflected in the "heat pump thermostat"

https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/heating.circuits.0.operating.programs.comfortCooling/commands/setTemperature is an example where the temperatures for cooling are set (this is the same as in heating mode, but for cooling)

https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/heating.power.consumption.cooling

is the consumption

Can we include these things? For reference I attached the Diag Info while cooling activated.

config_entry-vicare-362ff0329410f90a890487635b6f5bba.json

x4N70pHyLL avatar Jun 25 '24 09:06 x4N70pHyLL

Great that there is an API endpoint. Unfortunately, this is not exposed in the library: https://github.com/somm15/PyViCare/blob/master/PyViCare/PyViCareHeatPump.py

And usually changes to the library are not merged in a reasonable about of time 😭.

CFenner avatar Jun 25 '24 10:06 CFenner

Can we do something about it? I mean it looks to me there are several attributes that should be revamped and connected with the thermostat or somehow be included in the integration. See the other issue I mage for the programs/modes settings

x4N70pHyLL avatar Jun 25 '24 11:06 x4N70pHyLL

This endpoints would be great. Thanks for starting!

SpaceRichard avatar Jul 08 '24 11:07 SpaceRichard

Can we do something about it?

I tried to make some noise: https://github.com/somm15/PyViCare/pull/362#issuecomment-2192616183 https://discord.com/channels/864891057345921024/864891691538055178/1249731903989481572

But no response till now...

CFenner avatar Jul 08 '24 14:07 CFenner

Can we do something? It says some checks are failing....

x4N70pHyLL avatar Jul 29 '24 05:07 x4N70pHyLL

@x4N70pHyLL @SpaceRichard please have a look at https://github.com/home-assistant/core/pull/127267 and https://github.com/home-assistant/core/pull/127274 and test. This exposes number entities to set the target temp for cooling programs and makes cooling consumption available.

CFenner avatar Oct 02 '24 08:10 CFenner

@x4N70pHyLL @SpaceRichard would you have time to have a look?

CFenner avatar Oct 11 '24 19:10 CFenner

Sure, I would need some hints how to do so... I assume to put the to files the you changed in my HA directory and restart? Or do I have to change to the dev branch first?

x4N70pHyLL avatar Oct 12 '24 05:10 x4N70pHyLL

@x4N70pHyLL yes, there is a script that does that really easy!

https://gist.github.com/bdraco/43f8043cb04b9838383fd71353e99b18

Just run that in your HA terminal

curl -o- -L https://gist.githubusercontent.com/bdraco/43f8043cb04b9838383fd71353e99b18/raw/core_integration_pr | bash /dev/stdin -d vicare -p 127274

CFenner avatar Oct 16 '24 11:10 CFenner

Would like to test, but get the error when I try the command:

OS Version:               Home Assistant OS 13.2
  Home Assistant Core:      2024.10.2

  Home Assistant URL:       http://homeassistant.local:8123
  Observer URL:             http://homeassistant.local:4357
➜  ~ curl -o- -L https://gist.githubusercontent.com/bdraco/43f8043cb04b9838383fd71353e99b18/raw/core_integration_pr | bash /dev/stdin -d vicare -p 127274
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2593  100  2593    0     0   9183      0 --:--:-- --:--:-- --:--:--  9227
INFO: Current dir is /root
ERROR: Not a Home Assistant folder!
INFO: Cleaning up

SpaceRichard avatar Oct 16 '24 12:10 SpaceRichard

Change to config directory

CFenner avatar Oct 16 '24 12:10 CFenner

are you in the HA terminal add-on terminal?

CFenner avatar Oct 16 '24 12:10 CFenner

Yes, I'm in the Add-On Terminal

SpaceRichard avatar Oct 16 '24 12:10 SpaceRichard

Change to config directory

CFenner avatar Oct 16 '24 12:10 CFenner

Sorry for the long response time.

So I did the change and now see the following:

  • Integration switched to English (was German)
  • Entities for heating target temperatures are weirdly named: Wärmepumpe [%key:component::vicare::entity::number::comfort_temperature::name%]
  • Besides that, I do not see any new / changed entities in the integration - hysteresis for DHW came already with 2024-10 I think.

@CFenner Please advise.

Another question: How to roll back correctly? I am running in container, but to run the terminal command was not an issue via the container management. I do see vicare integration as custom component now.

x4N70pHyLL avatar Oct 18 '24 09:10 x4N70pHyLL

Are you testing https://github.com/home-assistant/core/pull/127274 now?

Integration switched to English (was German)

It's using the code as is without translations. German text will be available once in the release.

To use the bundled version of vicare, simple delete the custom_component/vicare folder.

CFenner avatar Oct 18 '24 10:10 CFenner

Are you testing #127274 now?

Yes

x4N70pHyLL avatar Oct 18 '24 11:10 x4N70pHyLL

Are you testing #127274 now?

Yes

Then you should see 3 new sensors Cooling energy consumption ....

Edit: oh, the dependency is not up to date..

CFenner avatar Oct 18 '24 12:10 CFenner

I updated the branch, it should now be correct. Please run the script again.

CFenner avatar Oct 18 '24 12:10 CFenner

Looks good so far:

  • I do have the 3 entities

  • 2 of them (monthly and yearly) are by standard deactivated. After activating them, they seem to be plausible Bildschirmfoto 2024-10-18 um 14 31 07 I would propose to either deactivate the consumption for heating and DWH as well by default or activate all 3 cooling consumptions by default as well to be consistent.

  • I still have the weird naming for target heating temperatures, should I just ignore this? Bildschirmfoto 2024-10-18 um 14 34 00

x4N70pHyLL avatar Oct 18 '24 12:10 x4N70pHyLL

Not sure what I do wrong, but I still miss this Entities (have 30 before and now)

SpaceRichard avatar Oct 18 '24 12:10 SpaceRichard

👍

I still have the weird naming for target heating temperatures, should I just ignore this?

Yes

@SpaceRichard I just updated the PR code, did you execute the script again?

CFenner avatar Oct 18 '24 12:10 CFenner

@SpaceRichard I just updated the PR code, did you execute the script again?

Yes, and restarted HA and refresh it

SpaceRichard avatar Oct 18 '24 12:10 SpaceRichard

Can you share your diagnostic file?

CFenner avatar Oct 18 '24 13:10 CFenner

https://github.com/home-assistant/core/pull/127267 also seemed plausible, temperatures are shown and match to what is shown in the ViCare iOS App. Well done :-) I did revert the changes by deleting the custom component, anything else I have to do for cleanup? There are some tmp/backup files created during installation

x4N70pHyLL avatar Oct 18 '24 13:10 x4N70pHyLL

Ok, then let's get this reviewed for the Nov release!

I did revert the changes by deleting the custom component, anything else I have to do for cleanup?

No, that's all that I know of.

CFenner avatar Oct 18 '24 13:10 CFenner

Can you share your diagnostic file?

config_entry-vicare-255bfd996c569657a9a5ce962451d6a4.json

SpaceRichard avatar Oct 18 '24 13:10 SpaceRichard