2020-02-14 23:07:12 +00:00
|
|
|
substitutions:
|
|
|
|
device_id: pool_and_patio_lights
|
|
|
|
device_name: Pool and Patio Lights
|
|
|
|
platform: ESP8266
|
|
|
|
board: esp01_1m
|
|
|
|
ip_address: !secret pool_and_patio_lights_ip
|
|
|
|
ota_pwd: !secret pool_and_patio_lights_ota_pwd
|
|
|
|
api_pwd: !secret pool_and_patio_lights_api_pwd
|
|
|
|
ap_wifi_pwd: !secret pool_and_patio_lights_ap_wifi_pwd
|
|
|
|
|
2020-10-07 22:21:38 +00:00
|
|
|
packages:
|
|
|
|
device_base: !include ../packages/device_base.yaml
|
|
|
|
|
2021-08-14 22:13:17 +00:00
|
|
|
external_components:
|
2021-08-18 02:55:21 +00:00
|
|
|
- source:
|
|
|
|
type: local
|
|
|
|
path: ../components
|
2021-08-19 02:58:32 +00:00
|
|
|
components: [ treo_led_pool_light, binary_light_with_power, total_daily_energy ]
|
2021-08-14 22:13:17 +00:00
|
|
|
- source: github://cbpowell/ESPSense
|
|
|
|
components: [ espsense ]
|
|
|
|
|
2020-02-14 23:07:12 +00:00
|
|
|
binary_sensor:
|
|
|
|
- platform: gpio
|
|
|
|
id: patio_lights_button
|
|
|
|
pin:
|
|
|
|
number: 12
|
|
|
|
mode: INPUT_PULLUP
|
|
|
|
on_press:
|
|
|
|
then:
|
|
|
|
- homeassistant.service:
|
|
|
|
service: homeassistant.toggle
|
|
|
|
data:
|
2020-06-02 11:10:05 +00:00
|
|
|
entity_id: light.patio_lights
|
2020-02-14 23:07:12 +00:00
|
|
|
- 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: |-
|
2021-08-19 02:58:32 +00:00
|
|
|
static_cast<TreoLedPoolLight *>(id(pool_lights).get_output())->next_color();
|
2020-02-15 16:33:46 +00:00
|
|
|
- platform: homeassistant
|
|
|
|
id: patio_lights
|
2020-06-02 11:10:05 +00:00
|
|
|
entity_id: light.patio_lights
|
2020-02-15 16:33:46 +00:00
|
|
|
on_press:
|
|
|
|
then:
|
|
|
|
- switch.turn_on: patio_lights_indicator
|
|
|
|
on_release:
|
|
|
|
then:
|
|
|
|
- switch.turn_off: patio_lights_indicator
|
2020-02-14 23:07:12 +00:00
|
|
|
|
2021-08-14 22:13:17 +00:00
|
|
|
espsense:
|
|
|
|
plugs:
|
|
|
|
- name: Pool Lights
|
|
|
|
power_sensor: pool_light_power
|
|
|
|
voltage: 120
|
|
|
|
|
2020-02-14 23:07:12 +00:00
|
|
|
light:
|
2021-08-19 02:58:32 +00:00
|
|
|
- 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
|
2021-08-14 22:13:17 +00:00
|
|
|
|
|
|
|
sensor:
|
|
|
|
- platform: total_daily_energy
|
|
|
|
name: Pool Lights
|
|
|
|
power_id: pool_light_power
|
2021-08-18 02:55:21 +00:00
|
|
|
method: left
|
|
|
|
min_save_interval: 10min
|
2020-02-14 23:07:12 +00:00
|
|
|
|
|
|
|
status_led:
|
|
|
|
pin:
|
|
|
|
number: 0
|
|
|
|
inverted: true
|
|
|
|
|
|
|
|
switch:
|
2020-02-15 16:33:46 +00:00
|
|
|
- platform: gpio
|
|
|
|
id: patio_lights_indicator
|
|
|
|
pin: 13
|
2021-08-14 22:13:17 +00:00
|
|
|
|
|
|
|
time:
|
|
|
|
- platform: homeassistant
|