Skip to content
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

Homekit integration #8

Open
sebasjunca opened this issue Dec 4, 2020 · 2 comments
Open

Homekit integration #8

sebasjunca opened this issue Dec 4, 2020 · 2 comments

Comments

@sebasjunca
Copy link

Hello Guys!

Firat of all I have to say that this is an amazing work. I bought the EVA II PRO WiFi just because of this (besides of course for being an excellent dehumidifier). I managed to get it to work in HA, but I’m having two issues:

Can’t seem to get automations working, and therefore it lacks the option of changing the fan speed.

I’m using homekit integration to expose the device into home app. It does show and work partially. The target humidity is showing a different and random number. Also, two different humidity sensor appear now, one is the: sensor.midea_dehumidifier_xxxxxxxxx and the other one is embedded with the dehumidifier icon in home app humidifier.midea_dehumidifier_xxxxxxxxx
The main issue is that the humidifier.midea_dehumidifier_xxxxxxxxx is showing 0% and everytime I ask Siri for the humidity in home it says is not correct (the sensor.midea is working fine).

Do you guys know How can I disable the relative current relative humidity meassure from the humidifier.midea_dehumidifier_xxxxxxxxx or to link it to the real measure?

Also, How can the Target humidity shown in home app can be fixed?

Thank you in advance!

@stefanovesca
Copy link

Hello Guys,
for me it's the first time on GitHub and Home Assistant anyway, I have more or less the same problems reported above:
In my configuration fan speed, modes and target humidity works well on Home Assistant, but in Homekit the only entities available are a humidity sensor and a dehumidifier device. This device, on iOS Home app, shows always 0% of humidity, no fan option, no mode option. Turning on the dehumidifier from iOS home app the device always turns on in SMART mode. I've tried to fix it by myself with no results. @barban-dev Could you please help me?

@oadslug
Copy link

oadslug commented Dec 20, 2021

This is an old post. So I'm not sure if you solved your problem or not. But it might help to create template switches for each of the modes and fan speeds (Smart, Continuous, and Boost), and add those to Homekit. This should more closely represent the buttons on the device and app as well. Note that my Midea model just has 2 fan speeds: 'Silent' (default speed) and 'Boost', and 3 modes: 'Smart' (aka 'Comfort'), 'Continuous', and 'Target_humidity' (default mode). Example config (your entity names may be different):

# Midea input_selects
input_select:
  midea_mode:
    name: "Midea Mode"
    options:
      - Target_humidity
      - Continuos
      - Smart
    icon: "mdi:animation-outline"
  midea_fan_speed:
    name: "Midea Fan Speed"
    options:
      - Silent
      - High
    icon: "mdi:animation-outline"

# Midea switches
switch:
  - platform: template
    switches:
      # Midea switches
      midea_smart_mode:
        value_template: "{{ is_state('input_select.midea_mode', 'Smart') }}"
        icon_template: mdi:brain
        turn_on:
          - service: midea_dehumidifier.set_mode
            data_template:
              entity_id: humidifier.midea_dehumidifier
              mode: 'Smart'
          - service: input_select.select_option
            data_template:
              entity_id: input_select.midea_mode
              option: 'Smart'
        turn_off:
          - service: midea_dehumidifier.set_mode
            data_template:
              entity_id: humidifier.midea_dehumidifier
              mode: 'Target_humidity'
          - service: input_select.select_option
            data_template:
              entity_id: input_select.midea_mode
              option: 'Target_humidity'

      midea_continuous_mode:
        value_template: "{{ is_state('input_select.midea_mode', 'Continuos') }}"
        icon_template: mdi:infinity
        turn_on:
          - service: midea_dehumidifier.set_mode
            data_template:
              entity_id: humidifier.midea_dehumidifier
              mode: 'Continuos'
          - service: input_select.select_option
            data_template:
              entity_id: input_select.midea_mode
              option: 'Continuos'
        turn_off:
          - service: midea_dehumidifier.set_mode
            data_template:
              entity_id: humidifier.midea_dehumidifier
              mode: 'Target_humidity'
          - service: input_select.select_option
            data_template:
              entity_id: input_select.midea_mode
              option: 'Target_humidity'

      midea_boost_mode:
        value_template: "{{ is_state('input_select.midea_fan_speed', 'High') }}"
        icon_template: mdi:fan
        turn_on:
          - service: midea_dehumidifier.set_fan_speed
            data_template:
              entity_id: humidifier.midea_dehumidifier
              fan_speed: 'High'
          - service: input_select.select_option
            data_template:
              entity_id: input_select.midea_fan_speed
              option: 'High'
        turn_off:
          - service: midea_dehumidifier.set_fan_speed
            data_template:
              entity_id: humidifier.midea_dehumidifier
              fan_speed: 'Silent'
          - service: input_select.select_option
            data_template:
              entity_id: input_select.midea_fan_speed
              option: 'Silent'

# Midea automations
automations:
  - id: 'midea_fan_speed_change'
    alias: Midea fan speed change
    trigger:
      entity_id: humidifier.midea_dehumidifier
      platform: state
    action:
      service: input_select.select_option
      data_template:
        entity_id: input_select.dehumidifier_fan_speed
        option: '{{ states.humidifier.midea_dehumidifier.attributes.fan_speed_mode }}'
  - id: 'midea_mode_change'
    alias: Midea mode change
    trigger:
      entity_id: humidifier.midea_dehumidifier
      platform: state
    action:
      service: input_select.select_option
      data_template:
        entity_id: input_select.midea_mode
        option: '{{ states.humidifier.midea_dehumidifier.attributes.mode }}'

#Homekit
homekit:
  - name: HA Bridge
    filter:
      include_entities:
        - humidifier.midea_dehumidifier
        - switch.midea_smart_mode
        - switch.midea_continuous_mode
        - switch.midea_boost_mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants