找回密码
 立即注册
查看: 3118|回复: 9

[求助] configuration.yaml 文件更改代码报错

[复制链接]

1

主题

4

回帖

52

积分

注册会员

积分
52
金钱
46
HASS币
0
发表于 2022-5-23 17:50:18 | 显示全部楼层 |阅读模式
各位大神好,我是刚研究这个的小白,我已经安装了homeassistant 8.0,并且安装了hscs 1.25.0。显示一切正常,但是一旦给 configuration文件添加语句后重启服务就报错,
添加语句后configuration.yaml 全部内容为:

# Loads default set of integrations. Do not remove.
default_config:

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

#于加入,一旦购买homepod 才能使用
#homekit:

#hacs:
# token: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

# 前端配置
frontend:
  ... # your configuration.
  themes: !include_dir_merge_named themes
  ... # your configuration.





加入信息是
frontend:
  ... # your configuration.
  themes: !include_dir_merge_named themes
  ... # your configuration.
重启服务报错内容为
The system cannot restart because the configuration is not valid: Error loading /config/configuration.yaml: while parsing a block mapping in "/config/configuration.yaml", line 3, column 1 expected <block end>, but found '<block mapping start>' in "/config/configuration.yaml", line 22, column 3,
甚至把加入的语句注释了也报错,
很奇怪,查了好多资料,百思不得其解,
然后下载hacs的主题插件也报错,无法下载,能下载lovelace,一旦下载主题就报错,报错是 could not downlaod,see log for details
可否哪位大神指点一二
回复

使用道具 举报

28

主题

535

回帖

4578

积分

论坛元老

积分
4578
金钱
4015
HASS币
0
发表于 2022-5-23 19:21:24 来自手机 | 显示全部楼层
8.0上古版本吗
回复

使用道具 举报

8

主题

371

回帖

4190

积分

论坛元老

积分
4190
金钱
3810
HASS币
10
发表于 2022-5-23 20:17:21 | 显示全部楼层
检查config目录下是否有themes文件夹

  ... # your configuration.前面的 ... 又是什么?
回复

使用道具 举报

1

主题

4

回帖

52

积分

注册会员

积分
52
金钱
46
HASS币
0
 楼主| 发表于 2022-5-23 20:21:39 | 显示全部楼层

不知道啊,好像是在官网上下载的wmware 的镜像,然后安装的,不知道现在的版本都是什么版本,我更新了一下,貌似只能更新到8.1
回复

使用道具 举报

1

主题

4

回帖

52

积分

注册会员

积分
52
金钱
46
HASS币
0
 楼主| 发表于 2022-5-23 20:22:44 | 显示全部楼层
版本提示:
Home Assistant Core 2022.5.5
Home Assistant Supervisor 2022.05.2
Home Assistant OS 8.0
Kernel version 5.15.38
回复

使用道具 举报

35

主题

955

回帖

4882

积分

论坛元老

积分
4882
金钱
3892
HASS币
20
发表于 2022-5-23 20:32:26 来自手机 | 显示全部楼层
nuaawmy 发表于 2022-5-23 19:21
8.0上古版本吗

Hassos最新确实到8了,应该是最新的
回复

使用道具 举报

1

主题

52

回帖

581

积分

高级会员

积分
581
金钱
528
HASS币
0
发表于 2022-5-24 14:13:13 | 显示全部楼层
主题加入那里改为:
frontend:
  themes: !include_dir_merge_named themes
回复

使用道具 举报

23

主题

232

回帖

1647

积分

金牌会员

积分
1647
金钱
1392
HASS币
0
发表于 2022-5-24 14:45:46 | 显示全部楼层
# 前面的...是 代码吗?不是就删除。。。。不错出错。。。
回复

使用道具 举报

1

主题

4

回帖

52

积分

注册会员

积分
52
金钱
46
HASS币
0
 楼主| 发表于 2022-5-25 11:31:32 | 显示全部楼层
ekingfan 发表于 2022-5-24 14:45
# 前面的...是 代码吗?不是就删除。。。。不错出错。。。

是的,忘记了,多谢提醒
回复

使用道具 举报

1

主题

4

回帖

52

积分

注册会员

积分
52
金钱
46
HASS币
0
 楼主| 发表于 2022-5-25 11:33:24 | 显示全部楼层
s2233 发表于 2022-5-23 20:17
检查config目录下是否有themes文件夹

  ... # your configuration.前面的 ... 又是什么? ...

多谢提醒,解决了
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )

GMT+8, 2025-5-10 18:17 , Processed in 0.154610 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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