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_none.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