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

 找回密码
 立即注册
查看: 5828|回复: 12

[求助] 新人自动化求助DC1接入了Home Assistant怎么自动开关

[复制链接]

5

主题

63

帖子

166

积分

注册会员

Rank: 2

积分
166
金钱
103
HASS币
0
发表于 2019-4-13 18:27:31 | 显示全部楼层 |阅读模式
新人自动化求助DC1接入了Home Assistant怎么自动开关
经过一天的折腾接入了,现在把自动化搞不定,大神请帮忙看看
插孔2  想要每天晚上12点打开,每天早上7点关闭
目前的配置(貌似没有触发,手动触发好像没有问题):
- id: '1555141852722'
  alias: WC-ON
  trigger:
  - at: '00:00:00'
    platform: time
  condition: []
  action:
  - service: switch.turn_on
    entity_id: switch.dc1_s2
- id: '1555142905129'
  alias: WC-OFF
  trigger:
  - at: '07:00:00'
    platform: time
  condition: []
  action:
  - service: switch.turn_off
    entity_id: switch.dc1_s2


QQ截图20190413182530.jpg
回复

使用道具 举报

10

主题

661

帖子

5334

积分

论坛元老

Rank: 8Rank: 8

积分
5334
金钱
4668
HASS币
50
发表于 2019-4-13 18:53:06 | 显示全部楼层
本帖最后由 缥缈的孤鸿 于 2019-4-13 18:58 编辑
- alias: switch_on
  initial_state: true
  trigger:
  - platform: time
    at: '00:00:00'
  action:
  - service: switch.turn_on 
    entity_id: switch.dc1_s2_template
- alias: switch_off
  initial_state: true
  trigger:
  - platform: time
    at: '07:00:00'
  action:
  - service: switch.turn_off
    entity_id: switch.dc1_s2_template

回复

使用道具 举报

5

主题

63

帖子

166

积分

注册会员

Rank: 2

积分
166
金钱
103
HASS币
0
 楼主| 发表于 2019-4-13 19:19:18 | 显示全部楼层
缥缈的孤鸿 发表于 2019-4-13 18:53
[code]- alias: switch_on
  initial_state: true
  trigger:

非常感谢,我试试
回复

使用道具 举报

5

主题

63

帖子

166

积分

注册会员

Rank: 2

积分
166
金钱
103
HASS币
0
 楼主| 发表于 2019-4-13 19:21:54 | 显示全部楼层
缥缈的孤鸿 发表于 2019-4-13 18:53
[code]- alias: switch_on
  initial_state: true
  trigger:

switch.dc1_s2  和  switch.dc1_s2_template  有区别吗
回复

使用道具 举报

5

主题

63

帖子

166

积分

注册会员

Rank: 2

积分
166
金钱
103
HASS币
0
 楼主| 发表于 2019-4-13 19:44:03 | 显示全部楼层
缥缈的孤鸿 发表于 2019-4-13 18:53
[code]- alias: switch_on
  initial_state: true
  trigger:

我是0.91.3 试了手动可以,自动还是不行,是不是需要重启服务哦 QQ截图20190413194221.jpg

回复

使用道具 举报

10

主题

661

帖子

5334

积分

论坛元老

Rank: 8Rank: 8

积分
5334
金钱
4668
HASS币
50
发表于 2019-4-14 00:10:56 | 显示全部楼层
重载自动化就可以了
回复

使用道具 举报

5

主题

63

帖子

166

积分

注册会员

Rank: 2

积分
166
金钱
103
HASS币
0
 楼主| 发表于 2019-4-14 00:13:09 | 显示全部楼层
缥缈的孤鸿 发表于 2019-4-14 00:10
重载自动化就可以了

谢谢,好像可以了,非常感谢
回复

使用道具 举报

0

主题

21

帖子

90

积分

注册会员

Rank: 2

积分
90
金钱
69
HASS币
0
发表于 2019-4-25 15:58:00 | 显示全部楼层
有全部代码吗?
回复

使用道具 举报

0

主题

21

帖子

90

积分

注册会员

Rank: 2

积分
90
金钱
69
HASS币
0
发表于 2019-4-25 16:23:40 | 显示全部楼层
[code]- alias: switch_on
  initial_state: true
  trigger:
这一段加在哪里呀?
回复

使用道具 举报

5

主题

63

帖子

166

积分

注册会员

Rank: 2

积分
166
金钱
103
HASS币
0
 楼主| 发表于 2019-4-25 16:29:57 | 显示全部楼层
kingylh 发表于 2019-4-25 16:23
[code]- alias: switch_on
  initial_state: true
  trigger:

automations.yaml  这个文件里面,我给你看我的

- id: '1555141852722'
  alias: WC-ON
  initial_state: true
  trigger:
  - platform: time
    at: '00:00:00'
  action:
  - service: switch.turn_on
    entity_id: switch.dc1_s3_template


- id: '1555142905129'
  alias: WC-OFF
  initial_state: true
  trigger:
  - platform: time
    at: '06:00:00'
  action:
  - service: switch.turn_off
    entity_id: switch.dc1_s3_template
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-19 15:23 , Processed in 0.058542 second(s), 34 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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