mirror of
https://github.com/nuttytree/ESPHome-Devices.git
synced 2024-08-30 18:12:19 +00:00
3cffad99dd
* Update most everything to report power and energy to Home Assistant and Sense * ESPSense is pulled from GitHub Co-authored-by: Chris Nussbaum <chris.nussbaum@protolabs.com>
57 lines
1.1 KiB
YAML
57 lines
1.1 KiB
YAML
substitutions:
|
|
device_id: patio_lights
|
|
device_name: Patio Lights
|
|
platform: ESP8266
|
|
board: d1_mini
|
|
ip_address: !secret patio_lights_ip
|
|
ota_pwd: !secret patio_lights_ota_pwd
|
|
api_pwd: !secret patio_lights_api_pwd
|
|
ap_wifi_pwd: !secret patio_lights_ap_wifi_pwd
|
|
|
|
packages:
|
|
device_base: !include ../packages/device_base.yaml
|
|
|
|
external_components:
|
|
- source: github://cbpowell/ESPSense
|
|
components: [ espsense ]
|
|
|
|
espsense:
|
|
plugs:
|
|
- name: Patio Lights
|
|
power_sensor: power
|
|
voltage: 120
|
|
|
|
light:
|
|
- platform: binary
|
|
name: "Patio Lights"
|
|
output: patio_lights_output
|
|
on_turn_on:
|
|
- sensor.template.publish:
|
|
id: power
|
|
state: 15.3
|
|
on_turn_off:
|
|
- sensor.template.publish:
|
|
id: power
|
|
state: 0.0
|
|
|
|
output:
|
|
- platform: gpio
|
|
id: patio_lights_output
|
|
pin: D1
|
|
|
|
sensor:
|
|
- platform: template
|
|
name: Patio Lights Power
|
|
id: power
|
|
unit_of_measurement: W
|
|
device_class: power
|
|
state_class: measurement
|
|
accuracy_decimals: 1
|
|
- platform: total_daily_energy
|
|
name: Patio Lights
|
|
power_id: power
|
|
state_class: measurement
|
|
|
|
time:
|
|
- platform: homeassistant
|