ESPHome-Devices/devices/basement_bathroom_shower_light_heater.yaml

110 lines
2.4 KiB
YAML
Raw Normal View History

2020-02-04 04:03:45 +00:00
substitutions:
device_id: basement_bath_shower_light_heat
device_name: Basement Bathroom Shower Light and Heater
platform: ESP8266
board: esp01_1m
ip_address: !secret basement_bathroom_shower_light_heater_ip
ota_pwd: !secret basement_bathroom_shower_light_heater_ota_pwd
api_pwd: !secret basement_bathroom_shower_light_heater_api_pwd
ap_wifi_pwd: !secret basement_bathroom_shower_light_heater_ap_wifi_pwd
packages:
device_base: !include ../packages/device_base.yaml
2020-02-04 04:03:45 +00:00
external_components:
- source: github://cbpowell/ESPSense
components: [ espsense ]
2020-02-04 04:03:45 +00:00
binary_sensor:
- platform: gpio
id: light_button
2020-02-04 04:03:45 +00:00
pin:
number: 12
mode: INPUT_PULLUP
on_press:
then:
- light.toggle: the_light
2020-02-04 04:03:45 +00:00
- platform: gpio
2020-02-06 04:04:00 +00:00
id: heater_button
2020-02-04 04:03:45 +00:00
pin:
number: 3
mode: INPUT_PULLUP
on_press:
then:
- switch.toggle: heater
espsense:
plugs:
- name: Basement Bathroom Shower Light
power_sensor: light_power
voltage: 120
- name: Basement Bathroom Heater
power_sensor: heat_power
voltage: 120
light:
- platform: binary
id: the_light
name: "Basement Shower Light"
output: light_output
on_turn_on:
- sensor.template.publish:
id: light_power
state: 11.5
on_turn_off:
- sensor.template.publish:
id: light_power
state: 0.0
output:
- platform: gpio
id: light_output
pin: 13
2020-02-04 04:03:45 +00:00
status_led:
pin:
number: 0
inverted: true
2020-02-04 04:03:45 +00:00
switch:
- platform: gpio
id: heater
name: "Basement Bathroom Heater"
icon: mdi:radiator
pin: 4
on_turn_on:
- sensor.template.publish:
id: heat_power
state: 500
on_turn_off:
- sensor.template.publish:
id: heat_power
state: 0.0
sensor:
- platform: template
name: Basement Bathroom Shower Light
id: light_power
unit_of_measurement: W
device_class: power
state_class: measurement
accuracy_decimals: 1
- platform: template
name: Basement Bathroom Heater
id: heat_power
unit_of_measurement: W
device_class: power
state_class: measurement
accuracy_decimals: 1
- platform: total_daily_energy
name: Basement Bathroom Shower Light
power_id: light_power
state_class: measurement
- platform: total_daily_energy
name: Basement Bathroom Heater
power_id: heat_power
state_class: measurement
time:
- platform: homeassistant