mirror of
https://github.com/nuttytree/ESPHome-Devices.git
synced 2024-08-30 18:12:19 +00:00
18bb3a8e5e
* Begin making updates needed for ESPHome v2021.8.0 * Wrap up changes needed for ESPHome 2021.8.0 Co-authored-by: Chris Nussbaum <chris.nussbaum@protolabs.com>
98 lines
2.1 KiB
YAML
98 lines
2.1 KiB
YAML
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
|
|
|
|
external_components:
|
|
- source:
|
|
type: local
|
|
path: ../components
|
|
components: [ treo_led_pool_light, binary_light_with_power ]
|
|
- source: github://cbpowell/ESPSense
|
|
components: [ espsense ]
|
|
- source: github://esphome/esphome@dev
|
|
components: [ total_daily_energy ]
|
|
|
|
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
|
|
|
|
espsense:
|
|
plugs:
|
|
- name: Pool Lights
|
|
power_sensor: pool_light_power
|
|
voltage: 120
|
|
|
|
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
|
|
power_id: pool_light_power
|
|
method: left
|
|
min_save_interval: 10min
|
|
|
|
status_led:
|
|
pin:
|
|
number: 0
|
|
inverted: true
|
|
|
|
switch:
|
|
- platform: gpio
|
|
id: patio_lights_indicator
|
|
pin: 13
|
|
|
|
time:
|
|
- platform: homeassistant
|