ESPHome-Devices/master_bed.yaml
ChNussbaum 414acf54cb Add garage_fridge
Add patio_lights
Add Feit dimmer common files
Add office_light
2019-12-30 20:26:12 -06:00

53 lines
1.4 KiB
YAML

substitutions:
device_id: master_bed
device_name: Master Bed
platform: ESP8266
board: nodemcuv2
ip_address: !secret master_bed_ip
ota_pwd: !secret master_bed_ota_pwd
api_pwd: !secret master_bed_api_pwd
ap_wifi_pwd: !secret master_bed_ap_wifi_pwd
esphome:
<<: !include common/esphome.yaml
includes:
- bed_sensor.h
<<: !include common/common.yaml
<<: !include common/logger/logger.yaml
binary_sensor:
- !include common/binary_sensor/status.yaml
- platform: custom
lambda: |-
auto bedSensor = new BedSensor();
App.register_component(bedSensor);
return {bedSensor->melissaInBed, bedSensor->chrisInBed, bedSensor->someoneInBed};
binary_sensors:
- name: "Melissa is in Bed"
id: melissa_in_bed
device_class: occupancy
- name: "Chris is in Bed"
id: chris_in_bed
device_class: occupancy
- name: "Someone is in Bed"
id: someone_in_bed
device_class: occupancy
sensor:
- !include common/sensor/uptime.yaml
- !include common/sensor/wifi.yaml
- platform: template
name: "Master Bed Count"
id: master_bed_count
accuracy_decimals: 0
icon: "mdi:hotel"
lambda: |-
return id(melissa_in_bed).state + id(chris_in_bed).state + id(someone_in_bed).state;
switch:
- !include common/switch/restart.yaml
text_sensor:
- !include common/text_sensor/version.yaml
- !include common/text_sensor/wifi.yaml