『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 11580|回复: 2

[经验分享] Home Assistant升级到2021.2.3后fan的问题

[复制链接]

21

主题

431

帖子

2495

积分

金牌会员

Rank: 6Rank: 6

积分
2495
金钱
2059
HASS币
20
发表于 2021-2-24 10:33:43 | 显示全部楼层 |阅读模式
本帖最后由 AnyLine 于 2021-2-24 10:36 编辑

Home Assistant升级到2021.2.3后,fan好用不像之前那么用了,ZM1空气净化器数字百分比风速无法使用了,求大神支招下,该怎怎办改写?
1.jpg

下面是目前配置,求大神分析:
phicomm_a1.rar (525 Bytes, 下载次数: 2)
fan:
  - platform: mqtt
    name: 'za1_MACMAC'
    unique_id: za1_MACMAC
    state_topic: "device/za1/MACMAC/state"
    command_topic: "device/za1/MACMAC/set"
    state_value_template: >
      {%- if value_json.on == 0 -%}
        {"mac":"MACMAC","on":0}
      {%- else -%}
        {"mac":"MACMAC","on":1}
      {%- endif -%}
    speed_state_topic: "device/za1/MACMAC/state"
    speed_command_topic: "device/za1/MACMAC/set"
    speed_value_template: >
      {%- if value_json.speed < 25 -%}
        {"mac":"MACMAC","speed":10}
      {%- elif value_json.speed < 75  -%}
        {"mac":"MACMAC","speed":50}
      {%- else  -%}
        {"mac":"MACMAC","speed":100}
      {%- endif -%}
    qos: 0
    payload_on: '{"mac":"MACMAC","on":1}'
    payload_off: '{"mac":"MACMAC","on":0}'
    payload_low_speed: '{"mac":"MACMAC","speed":20}'
    payload_medium_speed: '{"mac":"MACMAC","speed":40}'
    payload_high_speed: '{"mac":"MACMAC","speed":60}'
    speeds:
      - low
      - medium
      - high
      - '{"mac":"MACMAC","speed":10}'
      - '{"mac":"MACMAC","speed":20}'
      - '{"mac":"MACMAC","speed":30}'
      - '{"mac":"MACMAC","speed":40}'
      - '{"mac":"MACMAC","speed":50}'
      - '{"mac":"MACMAC","speed":60}'
      - '{"mac":"MACMAC","speed":70}'
      - '{"mac":"MACMAC","speed":80}'
      - '{"mac":"MACMAC","speed":90}'
      - '{"mac":"MACMAC","speed":100}'
          
homeassistant:
  customize:
    fan.za1_MACMAC:
      friendly_name: 空气净化器
      icon: mdi:concourse-ci


回复

使用道具 举报

34

主题

709

帖子

4693

积分

论坛元老

Rank: 8Rank: 8

积分
4693
金钱
3974
HASS币
50
发表于 2021-2-24 18:18:48 | 显示全部楼层
不是应该发在答疑区嘛
回复

使用道具 举报

46

主题

640

帖子

3831

积分

论坛元老

Rank: 8Rank: 8

积分
3831
金钱
3191
HASS币
0
发表于 2021-3-6 08:50:29 来自手机 | 显示全部楼层
好像最新版2021.3.1的已经支持了。或者用我的曲线方案也可实现更直观的效果
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-26 22:30 , Processed in 0.058280 second(s), 28 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表