Skip to content

小米空气净化器自动开启 #654

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

Open
yc-8418 opened this issue Jan 17, 2025 · 5 comments
Open

小米空气净化器自动开启 #654

yc-8418 opened this issue Jan 17, 2025 · 5 comments

Comments

@yc-8418
Copy link

yc-8418 commented Jan 17, 2025

Describe the Bug / 描述问题

空气净化器4 pro自己开启

How to Reproduce / 复现步骤

1.打开homeassistant
2.在xiaomi_home官方插件界面进行重新加载操作可以手动复现。有时存在自动触发开启。

Image

Expected Behavior / 预期结果

不手动操作开启永远不会开启

Reproduce Time / 问题复现的时间点

2025-01-17

Home Assistant Logs / 系统日志

No response

Log Timezone / 日志时区

Asia/Shanghai

Home Assistant Core Version / Home Assistant Core 版本

2024.12.5

Home Assistant Operation System Version / Home Assistant Operation System 版本

20241127.8

Xiaomi Home Integration Version / 米家集成版本

v0.1.5b1

Additional Context / 其他说明

No response

@topsworld topsworld self-assigned this Jan 17, 2025
@iamsxm
Copy link

iamsxm commented Jan 18, 2025

是的我也遇到这个问题了🙁看日志经常半夜状态变未知,然后就自动开启,固件升级了也没用

Image

Image

@topsworld topsworld removed their assignment Jan 24, 2025
@lulee007
Copy link

lulee007 commented Feb 14, 2025

同样遇到了,临时用自动化监测并关闭

Image

自动化脚本逻辑:
如果净化器开关状态从不可用状态发生变化,等待10秒后再次查看开关状态是否开启,如果开启并持续了5秒则关闭开关。

id: '1739491682189'
alias: 防止空气净化器自动开启
description: ''
triggers:
  - trigger: state
    entity_id:
      - switch.xiaomi_cn_净化器开关id
    from: unavailable
    to: null
conditions: []
actions:
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - if:
      - condition: state
        entity_id: switch.xiaomi_cn_净化器开关id
        state: 'on'
        for:
          hours: 0
          minutes: 0
          seconds: 5
    then:
      - action: switch.turn_off
        metadata: {}
        data: {}
        target:
          entity_id: switch.xiaomi_cn_净化器开关id
mode: single

@iamsxm
Copy link

iamsxm commented Feb 14, 2025

发现只要网络重新加载就会触发,我这边网络是代理重新启动就会触发

@iamsxm
Copy link

iamsxm commented Feb 14, 2025

同样遇到了,临时用自动化监测并关闭

Image

自动化脚本逻辑: 如果净化器开关状态从不可用状态发生变化,等待10秒后再次查看开关状态是否开启,如果开启并持续了5秒则关闭开关。

id: '1739491682189'
alias: 防止空气净化器自动开启
description: ''
triggers:
  - trigger: state
    entity_id:
      - switch.xiaomi_cn_净化器开关id
    from: unavailable
    to: null
conditions: []
actions:
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - if:
      - condition: state
        entity_id: switch.xiaomi_cn_净化器开关id
        state: 'on'
        for:
          hours: 0
          minutes: 0
          seconds: 5
    then:
      - action: switch.turn_off
        metadata: {}
        data: {}
        target:
          entity_id: switch.xiaomi_cn_净化器开关id
mode: single

老哥,你的语法好像在2024.6.2有问题,我改为下面的了

alias: 防止空气净化器自动开启
description: ""
trigger:
  - platform: state
    entity_id:
      - switch.xiaomi_cn_695807364_va2b_on_p_2_1
    from: unavailable
    to: null
condition: []
action:
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - if:
      - condition: state
        entity_id: switch.xiaomi_cn_695807364_va2b_on_p_2_1
        state: "on"
        for:
          hours: 0
          minutes: 0
          seconds: 5
    then:
      - service: switch.turn_off
        metadata: {}
        data: {}
        target:
          entity_id: switch.xiaomi_cn_695807364_va2b_on_p_2_1
mode: single

@hzonz
Copy link

hzonz commented Apr 30, 2025

+1 #1055

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

5 participants