Midea_dehumi Custom Component (Midea/Inventor Invmate EVA II PRO WiFi dehumidifier)

Has anyone managed to create a full tank sensor?

this configuration didn’ work

  • platform: template
    sensors:
    dehumidifier_19791209341795_tank:
    friendly_name: “Serbatoio deumidificatore”
    value_template: “{{ state_attr(‘humidifier.midea_dehumidifier_19791209341795’, ‘water_tank’) }}”
    device_class: problem

Thank you for your reply, however placing the linked_humidity_sensor gives an error in the config file:

Invalid config for [homekit]: [linked_humidty_sensor] is an invalid option for [homekit]. Check: homekit->homekit->0->entity_config->linked_humidty_sensor. (See /home/homeassistant/.homeassistant/configuration.yaml, line 29).

It seems that linked_humidity_sensor is not a valid setting for the accessory. I’ve read the documentation of the Homekit integration and the linked_xxxxxx_sensor seems to work more with motion, doorbell, obstruction…

Nevertheless, this is the approach I’m looking for, a manual way to direct the sensor to the real one.

For me is ok

Interesting. I’m using the EVA II Pro Wifi 16L, is this the same as yours?

Also, do you have in homekit two different accessories? the dehumidifier and a sensor?

I’ve installed the integration via HACS, and Homekit recognised the device without any special configuration.

Thanks in advance for all your help!

Yes I have EVA II Pro Wifi 16Lù

in homekit I publish 1 one object but I can do both

I resoved the problem with this modify in humidifier.py

#States Attributes
ATTR_ION_SET_SWITCH = “ion”
#ATTR_MODE = “mode”
ATTR_FAN_SPEED_MODE = “fan_speed_mode”
#ATTR_FAN_SPEED = “fan_speed”
ATTR_CURRRENT_HUMIDITY = “current_humidity”
ATTR_TANK="tank_show"
PROP_TO_ATTR = {
“ionSetSwitch”: ATTR_ION_SET_SWITCH,
“mode”: ATTR_MODE,
“windSpeedMode”: ATTR_FAN_SPEED_MODE,
“windSpeed”: ATTR_FAN_SPEED,
“current_humidity”: ATTR_CURRRENT_HUMIDITY,
"tank_show":ATTR_TANK
}

@property
def tank_show(self):
    """Return the current tank vakue."""
    return self._tankShow

and I create a sensor so:

  • platform: template
    sensors:
    dehumidifier_xxxxxxx_tank:
    friendly_name: “Serbatoio deumidificatore”
    value_template: “{{ states.humidifier.midea_dehumidifier_xxxxxx.attributes.tank_show==true }}”
    device_class: problem
1 Like

Thanks Maury77,

I tested this and it is working!
Now i can notify my phone, google TTS my google home devices and blink the lights when the tank is full :wink:

Now my sensors in configuration.yaml looks like:

  - platform: template
    sensors:
      midea_current_humidity:
        friendly_name: "midea_current_humidity"
        value_template: "{{ state_attr('humidifier.midea_dehumidifier_XXXXXXXXXXXXXX', 'current_humidity') }}"
        unit_of_measurement: "%"
      midea_target_humidity:
        friendly_name: "midea_target_humidity"
        value_template: "{{ state_attr('humidifier.midea_dehumidifier_XXXXXXXXXXXXXX', 'humidity') }}"
        unit_of_measurement: "%"
      midea_tank:
        friendly_name: "Tank dehumidifier"
        value_template: "{{ states.humidifier.midea_dehumidifier_XXXXXXXXXXXXXX.attributes.tank_show==true }}"

@Maury77,

Thank you for share your’s setup, now the tank sow me the status.

BR. Cristi

I’m getting an warning in my home assistant logs. But the automation works.
I have a automation that automatically shut down the air purifier at a set level, but only when the condition of the dehumidifier is on and drop-down selection is Living Room.
So i geus this warning coming from these automation, and has to do where it reads the state of the dehumidifier.

But why? i don’t see a problem.

The Warning:

Log Details (WARNING)
Logger: homeassistant.helpers.condition
Source: helpers/condition.py:234
First occurred: 9:48:25 (1 occurrences)
Last logged: 9:48:25

Value cannot be processed as a number: <state humidifier.midea_dehumidifier_30786325603194=on; min_humidity=40, max_humidity=85, available_modes=['Target_humidity', 'Continuos', 'Smart', 'Dryer'], humidity=45, mode=Target_humidity, ion=0, fan_speed_mode=High, fan_speed=80, current_humidity=54, tank_show=False, friendly_name=midea_dehumidifier_30786325603194, supported_features=1, device_class=dehumidifier @ 2020-12-25T08:16:36.460056+01:00> (Offending entity: on)

The automation:

- id: 'xxxxxxxxxxx'
  alias: Dehumidifier - Living Room Off
  trigger:
  - platform: numeric_state
    entity_id: humidifier.midea_dehumidifier_30786325603194
    for: 00:05:00
    below: '50'
  - type: opened
    platform: device
    device_id: 662e22ee9cc6a3493c53cc8cd4765d57
    entity_id: binary_sensor.raamsensor_eetkamer_on_off
    domain: binary_sensor
    for:
      hours: 0
      minutes: 0
      seconds: 15
  condition:
  - condition: state
    entity_id: input_select.room
    state: Woonkamer
  - condition: state
    entity_id: sensor.midea_dehumidifier_30786325603194
    state: 'on'
  action:
  - service: humidifier.turn_off
    data: {}
    entity_id: humidifier.midea_dehumidifier_30786325603194
  mode: single

By the way it is not necessary to set the sensor in the template =true

This is the same
{{ states.humidifier.midea_dehumidifier_XXXXXXXXXXXXXX.attributes.tank_show}}

Whoever is looking for the same AC solution as I was, https://github.com/mac-zhou/midea-ac-py is working for me.

Does it work for Dehumidifier too?

I dont have a Dehumidifier but from what I read on the github link I dont think it will (see below).

Note: This component only supports devices with model 0xac (air conditioner).

If marc-zhou’s solution is working for this type of dehumidifier, then this one should work also, as Marc is the base for it all😉


(Which is a spin off for Midea-A/C, thanks also to Rene Klootwijk and Sergey Dudanov)

Hi,
I’m trying to configure cards as yours, but can’t find what type to use to display drop down menù to set modes without tap on the dehumidifier card.
Can you help me?

The drop down is just the entities card :slight_smile:

So what’s wrong with my entities card? :frowning:
image

Nothing is wrong. That’s the entity for the dehumidifier. The dropdowns are for the input_select entities

You saved my life :rofl:
As them are not shown if you search for “midea” I’ve never seen them!
Thank you very much.

source code updated.
Thanks

1 Like