请选择 进入手机版 | 继续访问电脑版

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

 找回密码
 立即注册
查看: 5026|回复: 11

[基础教程] homeassistant

[复制链接]

1

主题

32

帖子

110

积分

注册会员

Rank: 2

积分
110
金钱
78
HASS币
0
发表于 2019-6-23 12:22:44 | 显示全部楼层 |阅读模式
想问一下大佬homeassistant  添加设备是在configuration.yaml里面写吗  如图 QQ截图20190623121937.png


还是另外有其他写法    为什么我写的tmall_genie: true没用。。。在配置里面没有

- -求大佬教学
回复

使用道具 举报

1

主题

179

帖子

3125

积分

论坛元老

Rank: 8Rank: 8

积分
3125
金钱
2946
HASS币
0
发表于 2019-6-23 12:43:51 | 显示全部楼层
写在customize下
回复

使用道具 举报

1

主题

32

帖子

110

积分

注册会员

Rank: 2

积分
110
金钱
78
HASS币
0
 楼主| 发表于 2019-6-23 13:02:37 来自手机 | 显示全部楼层
老铁能给一个截图吗,看一下你是怎么写的
回复

使用道具 举报

1

主题

32

帖子

110

积分

注册会员

Rank: 2

积分
110
金钱
78
HASS币
0
 楼主| 发表于 2019-6-23 13:05:26 来自手机 | 显示全部楼层
1096503000 发表于 2019-6-23 12:43
写在customize下

老铁能给一个截图吗,看一下你是怎么写的
回复

使用道具 举报

1

主题

179

帖子

3125

积分

论坛元老

Rank: 8Rank: 8

积分
3125
金钱
2946
HASS币
0
发表于 2019-6-23 13:51:47 | 显示全部楼层
易大宝 发表于 2019-6-23 13:05
老铁能给一个截图吗,看一下你是怎么写的

homeassistant:
  customize:
    switch.s7:
      friendly_name: 卧室灯
      icon: mdi:lightbulb
      tmall_genie: true
回复

使用道具 举报

1

主题

32

帖子

110

积分

注册会员

Rank: 2

积分
110
金钱
78
HASS币
0
 楼主| 发表于 2019-6-23 16:49:45 | 显示全部楼层
1096503000 发表于 2019-6-23 13:51
homeassistant:
  customize:
    switch.s7:

老哥我在customize.yaml写不对
在configuration.yaml写吧  customize: !include customize.yaml
1.png
改成图片这也也不对。。。恕小弟真心没看懂- -
回复

使用道具 举报

26

主题

2095

帖子

8461

积分

论坛元老

Rank: 8Rank: 8

积分
8461
金钱
6361
HASS币
30

论坛元老

发表于 2019-6-23 21:30:28 | 显示全部楼层
本帖最后由 情非殇 于 2019-6-23 21:42 编辑
易大宝 发表于 2019-6-23 16:49
老哥我在customize.yaml写不对
在configuration.yaml写吧  customize: !include customize.yaml

不是改你配置,只是给你的已经配置好的设备实体上,附加别的参数,比如friendly_name,,,啥的,

比如你的需求tmall_genie: true这个参数,你只要正常接入ha之后,找到设备id,然后从customize下面配置附加参数就好了,,

上面给你的例子已经很清楚了,你抄一下就好了,把switch.s7改成你要添加参数的设备id就OK了

回复

使用道具 举报

1

主题

179

帖子

3125

积分

论坛元老

Rank: 8Rank: 8

积分
3125
金钱
2946
HASS币
0
发表于 2019-6-23 22:10:28 | 显示全部楼层
易大宝 发表于 2019-6-23 16:49
老哥我在customize.yaml写不对
在configuration.yaml写吧  customize: !include customize.yaml

你直接复制配置回复,不要发成图片,我改个样式给你看
回复

使用道具 举报

1

主题

32

帖子

110

积分

注册会员

Rank: 2

积分
110
金钱
78
HASS币
0
 楼主| 发表于 2019-6-23 23:53:22 | 显示全部楼层
1096503000 发表于 2019-6-23 22:10
你直接复制配置回复,不要发成图片,我改个样式给你看

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 28.2277415897
  longitude: 112.8766929807
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Asia/Shanghai
  # Customization file
  customize: !include customize.yaml

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Sensors
sensor:
  # Weather prediction
  - platform: yr

switch:
  - platform: xiaomi_miio
    name: 米家智能插座增强版
    friendly_name: 米家智能插座增强版
    host: 192.168.123.161
    token: 976c75563aa756794f473f5
    tmall_genie: true
  - platform: xiaomi_miio
    name: 米家智能插线板
    friendly_name: 米家智能插线板
    host: 192.168.123.162
    token: 71ec2b4e2e527be3980d9b
    tmall_genie: true


# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
回复

使用道具 举报

1

主题

179

帖子

3125

积分

论坛元老

Rank: 8Rank: 8

积分
3125
金钱
2946
HASS币
0
发表于 2019-6-24 07:59:22 | 显示全部楼层
易大宝 发表于 2019-6-23 23:53
homeassistant:
  # Name of the location where Home Assistant is running
  name: Home

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 28.2277415897
  longitude: 112.8766929807
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Asia/Shanghai
  # Customization file
  customize:
    switch.米家智能插座增强版: #你的插座ID,英文的,homeassistant里面去看
      tmall_genie: true

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Sensors
sensor:
  # Weather prediction
  - platform: yr

switch:
  - platform: xiaomi_miio
    name: 米家智能插座增强版
    friendly_name: 米家智能插座增强版
    host: 192.168.123.161
    token: 976c75563aa756794f473f5
  - platform: xiaomi_miio
    name: 米家智能插线板
    friendly_name: 米家智能插线板
    host: 192.168.123.162
    token: 71ec2b4e2e527be3980d9b


# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

QQ图片20190624075818.png
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-3-29 19:05 , Processed in 0.109762 second(s), 35 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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