-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathperiod_selector.yaml
63 lines (60 loc) · 1.41 KB
/
period_selector.yaml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
blueprint:
name: 2.0TD Period selector from PVPC
description: Using PVPC sensors period attribute select a period on the energy utility meter.
domain: automation
source_url: https://github.com/yayitazale/automation-blueprints/blob/main/period_selector.yaml
input:
pvpc_entity:
name: Sensor PVPC
description: Selecciona la entidad sensor PVPC
selector:
entity:
domain: sensor
select_entity:
name: Contador
description: Selecciona la entidad select del contador
selector:
entity:
domain: select
trigger:
platform: state
entity_id:
- sensor.pvpc
attribute: period
condition: []
action:
choose:
- conditions:
- condition: state
entity_id: sensor.pvpc
attribute: period
state: P1
sequence:
- service: select.select_option
data:
option: P1
target:
entity_id: !input select_entity
- conditions:
- condition: state
entity_id: sensor.pvpc
attribute: period
state: P2
sequence:
- service: select.select_option
data:
option: P2
target:
entity_id: !input select_entity
- conditions:
- condition: state
entity_id: sensor.pvpc
attribute: period
state: P3
sequence:
- service: select.select_option
data:
option: P3
target:
entity_id: !input select_entity
mode: single