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

 找回密码
 立即注册
楼主: Courae_feng

[求助] 关于悟空M1接入HA的问题。

[复制链接]

1

主题

22

帖子

1100

积分

金牌会员

Rank: 6Rank: 6

积分
1100
金钱
1078
HASS币
0
 楼主| 发表于 2023-7-29 11:34:59 | 显示全部楼层
有木有大佬可以发下配置多的代码,我学习学习
回复

使用道具 举报

2

主题

129

帖子

1458

积分

金牌会员

Rank: 6Rank: 6

积分
1458
金钱
1329
HASS币
0
发表于 2023-7-29 11:39:24 | 显示全部楼层
在package下有几个就放几个配置文件即可,注意mac地址
回复

使用道具 举报

1

主题

22

帖子

1100

积分

金牌会员

Rank: 6Rank: 6

积分
1100
金钱
1078
HASS币
0
 楼主| 发表于 2023-7-29 13:39:29 | 显示全部楼层
alanshu 发表于 2023-7-29 11:39
在package下有几个就放几个配置文件即可,注意mac地址

感谢,我再试试
回复

使用道具 举报

1

主题

22

帖子

1100

积分

金牌会员

Rank: 6Rank: 6

积分
1100
金钱
1078
HASS币
0
 楼主| 发表于 2023-7-29 14:04:49 | 显示全部楼层
配置无效
Integration error: packages - Integration 'packages' not found.
回复

使用道具 举报

1

主题

22

帖子

1100

积分

金牌会员

Rank: 6Rank: 6

积分
1100
金钱
1078
HASS币
0
 楼主| 发表于 2023-7-29 14:08:35 | 显示全部楼层
tts:
  - platform: google_translate
  

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
homeassistant:
packages: !include_dir_named packages
#add MQTT auto discovery
回复

使用道具 举报

0

主题

28

帖子

532

积分

高级会员

Rank: 4

积分
532
金钱
504
HASS币
0
发表于 2023-7-29 19:36:29 来自手机 | 显示全部楼层
Platform error sensor.aircat - Integration 'aircat' not found.我提示这个咋办
回复

使用道具 举报

16

主题

236

帖子

1505

积分

金牌会员

Rank: 6Rank: 6

积分
1505
金钱
1269
HASS币
0
发表于 2023-7-29 20:09:21 | 显示全部楼层

Screenshot_2023-07-29-20-08-11-982_io.homeassistant.companion.android.jpg Screenshot_2023-07-29-20-08-22-411_io.homeassistant.companion.android.jpg

我的是这样
回复

使用道具 举报

16

主题

236

帖子

1505

积分

金牌会员

Rank: 6Rank: 6

积分
1505
金钱
1269
HASS币
0
发表于 2023-7-29 20:17:04 | 显示全部楼层
sensor  放一起
回复

使用道具 举报

16

主题

236

帖子

1505

积分

金牌会员

Rank: 6Rank: 6

积分
1505
金钱
1269
HASS币
0
发表于 2023-7-29 20:20:49 | 显示全部楼层


Screenshot_2023-07-29-20-19-48-368_io.homeassistant.companion.android.jpg
回复

使用道具 举报

1

主题

22

帖子

1100

积分

金牌会员

Rank: 6Rank: 6

积分
1100
金钱
1078
HASS币
0
 楼主| 发表于 2023-7-29 21:21:14 | 显示全部楼层
mqtt:
  sensor:
  - name: 'zm1_b0f8932597d2_temperature'
    # friendly_name: 温度
    state_topic: 'device/zm1/b0f8932597d2/sensor'
    unit_of_measurement: '°C'
    icon: 'mdi:thermometer'
    value_template: '{{ value_json.temperature }}'
    unique_id: "温度"
  - name: 'zm1_b0f8932597d2_humidity'
    # friendly_name: 湿度
    state_topic: 'device/zm1/b0f8932597d2/sensor'
    unit_of_measurement: '%'
    icon: mdi:water-percent
    value_template: '{{ value_json.humidity }}'
    unique_id: "湿度"
  - name: 'zm1_b0f8932597d2_pm25'
    # friendly_name: PM25
    state_topic: 'device/zm1/b0f8932597d2/sensor'
    unit_of_measurement: 'μg/m³'
    icon: mdi:blur
    value_template: '{{ value_json.PM25 }}'
    unique_id: "PM2.5"
  - name: 'zm1_b0f8932597d2_hcho'
    # friendly_name: 甲醛
    state_topic: 'device/zm1/b0f8932597d2/sensor'
    unit_of_measurement: 'mg/m³'
    icon: mdi:chemical-weapon
    value_template: '{{ value_json.formaldehyde }}'
    unique_id: "甲醛值"
  - name: 'zm1_b0f893234f71_temperature'
    # friendly_name: 温度
    state_topic: 'device/zm1/b0f893234f71/sensor'
    unit_of_measurement: '°C'
    icon: 'mdi:thermometer'
    value_template: '{{ value_json.temperature }}'
    unique_id: "温度"
  - name: 'zm1_b0f893234f71_humidity'
    # friendly_name: 湿度
    state_topic: 'device/zm1/b0f893234f71/sensor'
    unit_of_measurement: '%'
    icon: mdi:water-percent
    value_template: '{{ value_json.humidity }}'
    unique_id: "湿度"
  - name: 'zm1_b0f893234f71_pm25'
    # friendly_name: PM25
    state_topic: 'device/zm1/b0f893234f71/sensor'
    unit_of_measurement: 'μg/m³'
    icon: mdi:blur
    value_template: '{{ value_json.PM25 }}'
    unique_id: "PM2.5"
  - name: 'zm1_b0f893234f71_hcho'
    # friendly_name: 甲醛
    state_topic: 'device/zm1/b0f893234f71/sensor'
    unit_of_measurement: 'mg/m³'
    icon: mdi:chemical-weapon
    value_template: '{{ value_json.formaldehyde }}'
    unique_id: "甲醛值"
  - name: 'zm1_b0f89325b2a2_temperature'
    # friendly_name: 温度
    state_topic: 'device/zm1/b0f89325b2a2/sensor'
    unit_of_measurement: '°C'
    icon: 'mdi:thermometer'
    value_template: '{{ value_json.temperature }}'
    unique_id: "温度"
  - name: 'zm1_b0f89325b2a2_humidity'
    # friendly_name: 湿度
    state_topic: 'device/zm1/b0f89325b2a2/sensor'
    unit_of_measurement: '%'
    icon: mdi:water-percent
    value_template: '{{ value_json.humidity }}'
    unique_id: "湿度"
  - name: 'zm1_b0f89325b2a2_pm25'
    # friendly_name: PM25
    state_topic: 'device/zm1/b0f89325b2a2/sensor'
    unit_of_measurement: 'μg/m³'
    icon: mdi:blur
    value_template: '{{ value_json.PM25 }}'
    unique_id: "PM2.5"
  - name: 'zm1_b0f89325b2a2_hcho'
    # friendly_name: 甲醛
    state_topic: 'device/zm1/b0f89325b2a2/sensor'
    unit_of_measurement: 'mg/m³'
    icon: mdi:chemical-weapon
    value_template: '{{ value_json.formaldehyde }}'
    unique_id: "甲醛值"
  - name: 'zm1_b0f89325b3c2_temperature'
    # friendly_name: 温度
    state_topic: 'device/zm1/b0f89325b3c2/sensor'
    unit_of_measurement: '°C'
    icon: 'mdi:thermometer'
    value_template: '{{ value_json.temperature }}'
    unique_id: "温度"
  - name: 'zm1_b0f89325b3c2_humidity'
    # friendly_name: 湿度
    state_topic: 'device/zm1/b0f89325b3c2/sensor'
    unit_of_measurement: '%'
    icon: mdi:water-percent
    value_template: '{{ value_json.humidity }}'
    unique_id: "湿度"
  - name: 'zm1_b0f89325b3c2_pm25'
    # friendly_name: PM25
    state_topic: 'device/zm1/b0f89325b3c2/sensor'
    unit_of_measurement: 'μg/m³'
    icon: mdi:blur
    value_template: '{{ value_json.PM25 }}'
    unique_id: "PM2.5"
  - name: 'zm1_b0f89325b3c2_hcho'
    # friendly_name: 甲醛
    state_topic: 'device/zm1/b0f89325b3c2/sensor'
    unit_of_measurement: 'mg/m³'
    icon: mdi:chemical-weapon
    value_template: '{{ value_json.formaldehyde }}'
    unique_id: "甲醛值"

  light:
  - name: zm1_b0f8932597d2_brightness
    unique_id: "亮度"
    schema: template
    command_topic: "device/zm1/b0f8932597d2/set"
    state_topic: "device/zm1/b0f8932597d2/state"
    command_on_template: >
      {"mac": "b0f8932597d2"
      {%- if brightness is defined -%}
      , "brightness": {{ ((brightness-1) / 64 )|int +1 }}
      {%- else -%}
      , "brightness": 4
      {%- endif -%}
      }
    command_off_template: '{"mac": "b0f8932597d2", "brightness": 0}'
    state_template: >
      {%- if value_json.brightness == 0 -%}
        off
      {%- else -%}
        on
      {%- endif -%}
    brightness_template: >
      {%- if value_json.brightness is defined -%}
        {{ ( value_json.brightness *64 )|int }}
      {%- endif -%}
      unique_id: "亮度"
  - name: zm1_b0f893234f71_brightness
    unique_id: "亮度"
    schema: template
    command_topic: "device/zm1/b0f893234f71/set"
    state_topic: "device/zm1/b0f893234f71/state"
    command_on_template: >
      {"mac": "b0f893234f71"
      {%- if brightness is defined -%}
      , "brightness": {{ ((brightness-1) / 64 )|int +1 }}
      {%- else -%}
      , "brightness": 4
      {%- endif -%}
      }
    command_off_template: '{"mac": "b0f893234f71", "brightness": 0}'
    state_template: >
      {%- if value_json.brightness == 0 -%}
        off
      {%- else -%}
        on
      {%- endif -%}
    brightness_template: >
      {%- if value_json.brightness is defined -%}
        {{ ( value_json.brightness *64 )|int }}
      {%- endif -%}
      unique_id: "亮度"
  - name: zm1_b0f89325b2a2_brightness
    unique_id: "亮度"
    schema: template
    command_topic: "device/zm1/b0f89325b2a2/set"
    state_topic: "device/zm1/b0f89325b2a2/state"
    command_on_template: >
      {"mac": "b0f89325b2a2"
      {%- if brightness is defined -%}
      , "brightness": {{ ((brightness-1) / 64 )|int +1 }}
      {%- else -%}
      , "brightness": 4
      {%- endif -%}
      }
    command_off_template: '{"mac": "b0f89325b2a2", "brightness": 0}'
    state_template: >
      {%- if value_json.brightness == 0 -%}
        off
      {%- else -%}
        on
      {%- endif -%}
    brightness_template: >
      {%- if value_json.brightness is defined -%}
        {{ ( value_json.brightness *64 )|int }}
      {%- endif -%}
      unique_id: "亮度"
  - name: zm1_b0f89325b3c2_brightness
    unique_id: "亮度"
    schema: template
    command_topic: "device/zm1/b0f89325b3c2/set"
    state_topic: "device/zm1/b0f89325b3c2/state"
    command_on_template: >
      {"mac": "b0f89325b3c2"
      {%- if brightness is defined -%}
      , "brightness": {{ ((brightness-1) / 64 )|int +1 }}
      {%- else -%}
      , "brightness": 4
      {%- endif -%}
      }
    command_off_template: '{"mac": "b0f89325b3c2", "brightness": 0}'
    state_template: >
      {%- if value_json.brightness == 0 -%}
        off
      {%- else -%}
        on
      {%- endif -%}
    brightness_template: >
      {%- if value_json.brightness is defined -%}
        {{ ( value_json.brightness *64 )|int }}
      {%- endif -%}
      unique_id: "亮度"
customize:
#客厅
light.zm1_b0f8932597d2_brightness:
  friendly_name: 客厅M1亮度
sensor.zm1_b0f8932597d2_temperature:
  friendly_name: 客厅温度
sensor.zm1_b0f8932597d2_humidity:
  friendly_name: 客厅湿度
sensor.zm1_b0f8932597d2_pm25:
  friendly_name: 客厅PM2.5
sensor.zm1_b0f8932597d2_hcho:
  friendly_name: 客厅甲醛浓度
#次卧
light.zm1_b0f893234f71_brightness:
  friendly_name: 次卧M1亮度
sensor.zm1_b0f893234f71_temperature:
  friendly_name: 次卧温度
sensor.zm1_b0f893234f71_humidity:
  friendly_name: 次卧湿度
sensor.zm1_b0f893234f71_pm25:
  friendly_name: 次卧PM2.5
sensor.zm1_b0f893234f71_hcho:
  friendly_name: 次卧甲醛浓度
#北卧
light.zm1_b0f89325b2a2_brightness:
  friendly_name: 北卧M1亮度
sensor.zm1_b0f89325b2a2_temperature:
  friendly_name: 北卧温度
sensor.zm1_b0f89325b2a2_humidity:
  friendly_name: 北卧湿度
sensor.zm1_b0f89325b2a2_pm25:
  friendly_name: 北卧PM2.5
sensor.zm1_b0f89325b2a2_hcho:
  friendly_name: 北卧甲醛
#主卧
light.zm1_b0f89325b3c2_brightness:
  friendly_name: 主卧M1亮度
sensor.zm1_b0f89325b3c2_temperature:
  friendly_name: 主卧温度
sensor.zm1_b0f89325b3c2_humidity:
  friendly_name: 主卧湿度
sensor.zm1_b0f89325b3c2_pm25:
  friendly_name: 主卧PM2.5
sensor.zm1_b0f89325b3c2_hcho:
  friendly_name: 主卧甲醛
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-22 23:44 , Processed in 0.132762 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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