ESPHome-Devices/devices/pool_and_patio_lights.yaml

96 lines
2.0 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
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-pwd
2020-02-14 23:07:12 +00:00
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 ]
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: |-
static_cast<TreoLedPoolLight *>(id(pool_lights).get_output())->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
espsense:
plugs:
- name: Pool Lights
power_sensor: pool_light_power
voltage: 120
2020-02-14 23:07:12 +00:00
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
icon: mdi:flash
power_id: pool_light_power
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
time:
- platform: homeassistant