-
Notifications
You must be signed in to change notification settings - Fork 14
/
pool-and-patio-lights.yaml
82 lines (75 loc) · 1.75 KB
/
pool-and-patio-lights.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
substitutions:
device_id: pool-and-patio-lights
device_name: Pool and Patio Lights
board: esp01_1m
ip_address: !secret pool_and_patio_lights_ip
api_key: !secret pool_and_patio_lights_key
pwd: !secret pool_and_patio_lights_pwd
packages:
device_base: !include ./packages/device_base_esp8266.yaml
external_components:
- source:
type: local
path: ./components
components: [ treo_led_pool_light, binary_light_with_power ]
binary_sensor:
- platform: gpio
id: patio_lights_button
pin:
number: 12
mode: INPUT_PULLUP
on_press:
then:
- homeassistant.service:
service: homeassistant.toggle
data:
entity_id: light.patio_lights
- platform: gpio
id: pool_lights_button
pin:
number: 5
mode: INPUT_PULLUP
on_press:
then:
- light.toggle: pool_lights
- platform: gpio
id: color_button
pin:
number: 3
mode: INPUT_PULLUP
on_press:
then:
- lambda: |-
static_cast<TreoLedPoolLight *>(id(pool_lights).get_output())->next_color();
- platform: homeassistant
id: patio_lights
entity_id: light.patio_lights
on_press:
then:
- switch.turn_on: patio_lights_indicator
on_release:
then:
- switch.turn_off: patio_lights_indicator
light:
- platform: treo_led_pool_light
id: pool_lights
name: "Pool Lights"
pin: 15
power:
id: pool_light_power
name: Pool Lights Power
light_wattage: 10.0
sensor:
- platform: total_daily_energy
name: Pool Lights
icon: mdi:flash
power_id: pool_light_power
method: left
status_led:
pin:
number: 0
inverted: true
switch:
- platform: gpio
id: patio_lights_indicator
pin: 13