wuwentao / midea_ac_lan

Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network.
MIT License
224 stars 10 forks source link

The washing machine sensor cannot be displayed normally in homekit #92

Closed lwydyby closed 2 months ago

lwydyby commented 2 months ago

HA Version

2024.5.4

Integration Version

v0.4.1

Device Type and Model

Front Load Washer 38124999 (14404)

App in Use

Midea MSmartHome

Detailed Issue Description

After adding the washer and dryer to the HA dashboard, they display correctly. image However, when I connect the sensors to Homekit via the Homekit bridge, they do not display correctly in the Home app.Currently, I have simulated two sensors for the washing machine as a binary_sensor and a temperature sensor, but displaying time with a temperature sensor doesn't feel user-friendly. The configuration is as follows:

input_select:
  washing_machine_status:
    name: 洗衣机状态
    options:
      - "空闲"
      - "洗涤"
      - "漂洗"
      - "甩干"
    initial: "空闲"

automation:
  - alias: 更新洗衣机状态
    trigger:
      - platform: state
        entity_id: sensor.188016xxx26566_progress
    action:
      - service: input_select.select_option
        target:
          entity_id: input_select.washing_machine_status
        data:
          option: >
            {% set step = states('sensor.188016xxx826566_progress') %}
            {% if step == 'Idle' %}
              空闲
            {% elif step == 'Wash' %}
              洗涤
            {% elif step == 'Rinse' %}
              漂洗
            {% elif step == 'Spin' %}
              甩干
            {% else %}
              未知
            {% endif %}

sensor:
  - platform: template
    sensors:
      washing_machine_remaining_time_as_temperature:
        friendly_name: "洗衣机剩余时间"
        unit_of_measurement: "°C"
        value_template: >
          {% set time_remaining = states('sensor.18801648xxx6566_time_remaining') %}
          {% if time_remaining in ['未知', 'unavailable', '', 'unknown'] %}
            0
          {% else %}
            {{ time_remaining | int }}
          {% endif %}

binary_sensor:
  - platform: template
    sensors:
      washing_machine_idle:
        friendly_name: "空闲"
        value_template: "{{ is_state('input_select.washing_machine_status', '空闲') }}"

      washing_machine_wash:
        friendly_name: "洗涤"
        value_template: "{{ is_state('input_select.washing_machine_status', '洗涤') }}"

      washing_machine_rinse:
        friendly_name: "漂洗"
        value_template: "{{ is_state('input_select.washing_machine_status', '漂洗') }}"

      washing_machine_spin:
        friendly_name: "甩干"
        value_template: "{{ is_state('input_select.washing_machine_status', '甩干') }}"

Is there any way to make the sensors display correctly in Homekit?

The logs

No response

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: The washing machine sensor cannot be displayed normally in homekit

Necroneco commented 2 months ago

你是说,这个集成在HA这边没什么问题对吧?那就应该算是 HomeKit 那边的问题?HomeKit 本身就没支持这些功能,那自然也是没什么办法的了。 小小的个人建议:别啥都往HomeKit那边接= = 然后 对于你目前的方案,我只能喊666,我觉得已经很强了。这类需求建议去论坛聊聊,看看别人有没有什么其他做法。

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


You mean, there is no problem with this integration on the HA side, right? So this should be considered a HomeKit problem? HomeKit itself does not support these functions, so there is nothing you can do. A small personal suggestion: don’t connect everything to HomeKit = = Then for your current plan, I can only shout 666, I think it is already very strong. For this kind of needs, it is recommended to go to the forum to chat and see if others have any other methods.

lwydyby commented 2 months ago

你是说,这个集成在HA这边没什么问题对吧?那就应该算是 HomeKit 那边的问题?HomeKit 本身就没支持这些功能,那自然也是没什么办法的了。 小小的个人建议:别啥都往HomeKit那边接= = 然后 对于你目前的方案,我只能喊666,我觉得已经很强了。这类需求建议去论坛聊聊,看看别人有没有什么其他做法。

是的,接入ha没什么问题,主要其他的家电全都已经接入到homekit了,就差一个洗衣机和烘干机了,那我去论坛里问问

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


You are saying that there is no problem with this integration on the HA side, right? So this should be considered a HomeKit problem? HomeKit itself does not support these functions, so there is nothing you can do. A small personal suggestion: don’t connect everything to HomeKit = = Then for your current solution, I can only call 666, I think it is already very strong. For this kind of needs, it is recommended to go to the forum to chat and see if others have any other methods.

Yes, there is no problem with connecting to ha. The main thing is that all other home appliances have been connected to HomeKit. The only thing missing is a washing machine and dryer. Then I will ask on the forum.

Necroneco commented 2 months ago

OK,那这边就先关闭issue了,有需要可以随时再开。

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


OK, let me close the issue here first. You can open it again at any time if necessary.