robot
#1
自动化要求
触发
- 传感器precip_intensity的state是rain
条件
两个条件同时成立
- 所以设备all_devices的state是home
- 时间在14点到23点之间
执行
homeassitant
automation:
- alias: 'Rainy Day'
trigger:
- platform: state
entity_id: sensor.precip_intensity
to: 'rain'
condition:
- condition: state
entity_id: group.all_devices
state: 'home'
- condition: time
after: '14:00'
before: '23:00'
action:
service: light.turn_on
entity_id: light.couch_lamp
node-red
Rainy Day.json (2.8 KB)
robot
#2
自动化要求
触发
- 传感器precip_intensity的state变成none状态
条件
执行
homeassistant
- alias: 'Rain is over'
trigger:
- platform: state
entity_id: sensor.precip_intensity
to: 'None'
condition:
- condition: sun
after: 'sunset'
after_offset: '-01:00:00'
action:
service: light.turn_off
entity_id: light.couch_lamp
node-red
Rain is over.json (2.1 KB)
robot
#3
自动化要求
触发
- 播放器htpc的state从playing状态变成idle
条件
执行
homeassistant
- alias: "Media player paused/stopped"
trigger:
- platform: state
entity_id: media_player.htpc
from: 'playing'
to: 'idle'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
service: script.turn_on
entity_id: script.livingroom_normal
node-red
Media player paused:stopped.json (3.9 KB)