summaryrefslogtreecommitdiffstats
path: root/blueprints/script/devices/aircon_off.yaml
blob: f0132f12feeafa30b7d3f2472ef3486ea6453542 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
blueprint:
  name: AirCon Off
  description: Turn off Air Condition
  domain: script
  input:
    power:
      name: Power
      description: Aircon Smart Power Plug
      selector:
        entity:
          domain: switch
    off_scene:
      name: Off Scene
      description: Off scene of Aircon
      selector:
        entity:
          domain: scene

alias: AirCon
sequence:
  - if:
      - condition: state
        entity_id: !input power
        state: 'on'
    then:
      - service: scene.turn_on
        target:
          entity_id: !input off_scene
      - delay:
          hours: 0
          minutes: 0
          seconds: 5
          milliseconds: 0
      - service: switch.turn_off
        target:
          entity_id: !input power
mode: single