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 esphome: includes: - ../custom/TreoLedPoolLight.h 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: |- Treo->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: 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: - platform: gpio id: patio_lights_indicator pin: 13