ESPHome-Devices/patio_and_pool_lights.yaml

86 lines
1.9 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
esphome:
<<: !include common/esphome.yaml
2020-02-15 16:33:46 +00:00
includes:
- TreoLedPoolLight.h
2020-02-14 23:07:12 +00:00
<<: !include common/common.yaml
<<: !include common/logger/logger_none.yaml
binary_sensor:
- !include common/binary_sensor/status.yaml
- platform: gpio
id: patio_lights_button
pin:
number: 12
mode: INPUT_PULLUP
on_press:
then:
- homeassistant.service:
service: homeassistant.toggle
data:
entity_id: switch.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: |-
Treo->next_color();
2020-02-15 16:33:46 +00:00
- platform: homeassistant
id: patio_lights
entity_id: switch.patio_lights
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"
sensor:
- !include common/sensor/uptime.yaml
- !include common/sensor/wifi.yaml
status_led:
pin:
number: 0
inverted: true
switch:
- !include common/switch/restart.yaml
2020-02-15 16:33:46 +00:00
- platform: gpio
id: patio_lights_indicator
pin: 13
2020-02-14 23:07:12 +00:00
text_sensor:
- !include common/text_sensor/version.yaml
- !include common/text_sensor/wifi.yaml