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

 找回密码
 立即注册
查看: 6271|回复: 1

群晖 ha 添加开关模块配置

[复制链接]

1

主题

11

帖子

56

积分

注册会员

Rank: 2

积分
56
金钱
45
HASS币
0
发表于 2018-4-13 13:26:50 | 显示全部楼层 |阅读模式
按论坛教程 安装了ha ,能打开ha页面,但是想添加单键开关模块,改configuration.yaml文件,加上mqtt 和开关的代码 ha就不能启动,麻烦高手帮忙看看
homeassistant:
  # Name of the location where Home Assistant is running
  name: LYX-Home
  # Location required to calculate the time the sun rises and sets
  latitude: 39.3853
  longitude: 118.113
  # 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: [url]http://en.wikipedia.org/wiki/List_of_tz_database_time_zones[/url]
  time_zone: Asia/Shanghai
  # Customization file
  customize: !include customize.yaml

# Show links to resources in log and frontend
#introduction:

# Enables the frontend
frontend:

# Enables configuration UI
config:

http:
  # Secrets are defined in the file secrets.yaml
  # api_password: !secret http_password
  # Uncomment this if you are using SSL/TLS, running in Docker container, etc.
  # base_url: example.duckdns.org:8123

# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# [url]https://home-assistant.io/blog/2016/10/25/explaining-the-updater/[/url]
updater:
  # Optional, allows Home Assistant developers to focus on popular components.
  # include_used_components: true

# Discover some devices automatically
discovery:

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time
history:

# View all events in a logbook
logbook:

# Enables a map showing the location of tracked devices
map:

# Track the sun
sun:

# Weather prediction
sensor:
  - platform: yr
    name: Weather
    forecast: 24           #未来24小时天气,可有手工按需修改
    monitored_conditions:
      - temperature        #气温
      - precipitation      #雨量
      - windSpeed          #风速
      - pressure           #气压
      - windDirection      #风向
      - humidity           #湿度

# Text to speech
tts:
  - platform: baidu
    #app_id,api_key,secret_key从百度云上注册得到
    app_id: 11070765 
    api_key: q2KlaOnaRq7fLQuEzeOWFHX4
    secret_key: bLSVM6aQGjySAlpclIYDZcRnctDRmqpG
    #speed:语速0-9(缺省5)
    #pitch:语调0-9(缺省5)
    #volume:音量0-15(缺省5)
    #person:声音(0:女,1:男,3:百度合成,4:百度合成,缺省0)
    speed: 5
    pitch: 5
    volume: 15
    person: 0
# Cloud
cloud:

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

#安防警报
alarm_control_panel:
  - platform: manual
    name: Alarm
    code: 1688
    pending_time: 6
    
#mqtt
    #broker: 192.168.3.120
    #port: 1883
    #username: pi
    #password: 123456
    #discovery: true    
#switch:
#    platform: mqtt
#    name: deng_1
#   state_topic: hassmart/switch/hassmart_1key_module_C27565_1/state
#   command_topic: hassmart/switch/hassmart_1key_module_C27565_1/set
#  qos: 1
#  retain: false


这些代码加上就打不开ha页面

这些代码加上就打不开ha页面
mqtt.png

mqtt 的配置

mqtt 的配置

mqtt 的配置

mqtt 的配置
回复

使用道具 举报

6

主题

269

帖子

1074

积分

论坛积极会员

积分
1074
金钱
804
HASS币
0
发表于 2018-4-16 10:47:40 | 显示全部楼层
代码编写问题!

在switch,空白问题! 直接在检查一遍switch以下的编写形式!
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-23 15:06 , Processed in 0.478623 second(s), 27 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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