aaa 发表于 2019-3-25 18:23:08

依次开关的自动化

之前这样写的,更新版本后就不可用了,请大佬指导一下,如何实现依次开关设备的自动化,感谢!
- data:
      entity_id: light.da_ting_4
    service: light.turn_on
- delay: ''
- data:
      entity_id: light.da_ting_5
    service: light.turn_on
- delay: ''
- data:
      entity_id: light.da_ting_6
    service: light.turn_on
- delay: ''

情非殇 发表于 2019-3-25 18:47:47

应该是delay写法不支持了吧,换成-delay: 00:00:00.000这样的格式

natic 发表于 2019-3-25 18:48:14

查一下官方文档,很简单的

aaa 发表于 2019-3-27 10:45:14

情非殇 发表于 2019-3-25 18:47
应该是delay写法不支持了吧,换成-delay: 00:00:00.000这样的格式

这样写好像不行,打开第一个灯后就停止了

chinyaolin 发表于 2019-3-27 18:25:12

https://www.home-assistant.io/docs/scripts/
# Waits 1 hour
- delay: '01:00'
# Waits 1 minute, 30 seconds
- delay: '00:01:30'
# Waits 1 minute
- delay:
    # Supports milliseconds, seconds, minutes, hours, days
    minutes: 1
# Waits however many seconds input_number.second_delay is set to
- delay:
    # Supports milliseconds, seconds, minutes, hours, days
    seconds: "{{ states('input_number.second_delay') }}"
# Waits however many minutes input_number.minute_delay is set to
# Valid formats include HH:MM and HH:MM:SS
- delay: "{{ states('input_number.minute_delay') | multiply(60) | timestamp_custom('%H:%M:%S',False) }}"

aaa 发表于 2019-3-27 18:44:46

natic 发表于 2019-3-25 18:48
查一下官方文档,很简单的

感谢指导,解决了

aaa 发表于 2019-3-27 18:50:32

chinyaolin 发表于 2019-3-27 18:25
https://www.home-assistant.io/docs/scripts/
# Waits 1 hour
- delay: '0 ...

感谢指导,想实现毫秒级流动效果但是效果一直不理想,最后也是通过waits解决的
页: [1]
查看完整版本: 依次开关的自动化