本帖最后由 dinglifeng 于 2019-1-3 15:00 编辑
好了 ,这么写报错呢?
- alias: door open light up #日落或晚上开门开玄关灯带
trigger:
- platform: state
entity_id: sensor.broadlink_s1c_博联入户门磁
from: closed
to: open
condition:
condition: or
conditions:
- condition: state
entity_id: sun.sun
state: below_horizon
- condition: time
after: '17:00:00'
before: 05:00:00
- condition: template
value_template: '{{ sensor.broadlink_sensor_light < 2 }}'
action:
- service: light.turn_on
entity_id: light.xuanguandengdai
- service: rokid_tts.speak
message: "欢迎回家,已为您打开玄关灯带"
|