ESPHome-Devices/devices/patio_and_pool_lights.yaml

76 lines
1.6 KiB
YAML
Raw Normal View History

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
packages:
device_base: !include ../packages/device_base.yaml
2020-02-14 23:07:12 +00:00
esphome:
2020-02-15 16:33:46 +00:00
includes:
- ../custom/TreoLedPoolLight.h
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:
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: |-
Treo->next_color();
2020-02-15 16:33:46 +00:00
- platform: homeassistant
id: patio_lights
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
light:
- platform: custom
lambda: |-
Treo = new TreoLedPoolLight(15);
App.register_component(Treo);
return {Treo};
lights:
- id: pool_lights
name: "Pool Lights"
status_led:
pin:
number: 0
inverted: true
switch:
2020-02-15 16:33:46 +00:00
- platform: gpio
id: patio_lights_indicator
pin: 13