syssi / xiaomi_airconditioningcompanion

Xiaomi Mi and Aqara Air Conditioning Companion integration for Home Assistant
Apache License 2.0
398 stars 94 forks source link

Power consumption #123

Open SPEC1AL1ST opened 3 years ago

SPEC1AL1ST commented 3 years ago

How can I see the power consumption? The air conditioner is connected to the companion. The original app shows the power consumption.

syssi commented 3 years ago

Which acpartner model do you own?

SPEC1AL1ST commented 3 years ago

Aqara Air Conditioning Companion (lumi.acpartner.v3) and his have it...

syssi commented 3 years ago

Could you provide a screenshot of your climate entity (dev-state page of the developer tools). There should be an attribute called load_power providing the power consumption.

dincojazz commented 3 years ago

Hi! I have the same problem... Can you give me some advice for show up power consumption at lovelace card?

The air conditioner is connected to the companion. The original Xiaomi Mi Home app shows the power consumption. Aqara Air Conditioning Companion (lumi.acpartner.v1) and his have it... There are screenshots from Home Assistant: LovelaceCard ClimateAqaraACC

zsqduke commented 2 years ago

Hi, @syssi I found the load_power attribute and I was able to create a template sensor using it and then use Riemann sum integral to create an energy sensor. This gives me a power consumption but the number a little bit smaller than what Mi Home reports.

So here’s my request. Add the native power consumption (kWh) statistic to this integration, as an additional attribute. I’ll do the rest. That would make this integration perfect! I appreciate all your work!

SPEC1AL1ST commented 2 years ago

Still, the option is very necessary. Can anyone help implement it?

syssi commented 2 years ago
template:
  - sensor:
    unique_id: "sensor"
      - name: "acpartner load power attribute as sensor"
        state: "{{ state_attr('climate.YOUR_ACPARNTER_ENTITY', 'load_power') }}"
        unit_of_measurement: W

The sensor provides the measurements of the acpartner 1:1 (instantaneous power in W). If you are looking for the power consumption in Wh you have to calculate the integral:

sensor:
  - platform: integration
    name: "acpartner power consumption"
    round: 6
    unit_time: h
    source: sensor.acpartner_load_power_attribute_as_sensor
SPEC1AL1ST commented 2 years ago

Thank you! And next question: My acpartner.v3 has a internet radio support. Maybe who have a way for enable it in Homeassistant? The siren option is also being considered.