Get all sensors working on basement bathroom sensor

This commit is contained in:
ChNussbaum 2020-02-04 22:04:48 -06:00
parent 1a12dcd805
commit 3d1d211ce9
2 changed files with 48 additions and 11 deletions

View File

@ -10,24 +10,52 @@ substitutions:
esphome: esphome:
<<: !include common/esphome.yaml <<: !include common/esphome.yaml
on_boot:
then:
- output.turn_on: motion_pwr
<<: !include common/common.yaml <<: !include common/common.yaml
<<: !include common/logger/logger.yaml <<: !include common/logger/logger.yaml
i2c:
sda: D2
scl: D1
scan: true
binary_sensor: binary_sensor:
- !include common/binary_sensor/status.yaml - !include common/binary_sensor/status.yaml
- platform: gpio - platform: gpio
name: Basement Bathroom Motion name: Basement Bathroom Motion
device_class: motion device_class: motion
pin: pin:
number: D number: D0
mode: INPUT_PULLUP mode: INPUT_PULLDOWN_16
- platform: gpio - platform: gpio
name: Basement Bathroom Door name: Basement Bathroom Door
device_class: door device_class: door
pin: pin:
number: D number: D7
mode: INPUT_PULLUP mode: INPUT_PULLUP
- platform: homeassistant
id: day_night
entity_id: input_boolean.day_night
- platform: homeassistant
id: shower_light
entity_id: switch.basement_shower_light
output:
- platform: gpio
pin: D3
id: bme_gnd
- platform: gpio
pin: D5
id: motion_gnd
- platform: gpio
pin: D6
id: motion_pwr
- platform: gpio
pin: D8
id: door_gnd
sensor: sensor:
- !include common/sensor/uptime.yaml - !include common/sensor/uptime.yaml
@ -42,17 +70,24 @@ sensor:
humidity: humidity:
id: humidity id: humidity
name: "Basement Bathroom Humidity" name: "Basement Bathroom Humidity"
address: 0x77 address: 0x76
update_interval: 30s update_interval: 15s
- platform: template - platform: template
name: "Basement Bathroom Median Humidity" name: "Basement Bathroom Median Humidity"
lambda: return id(humidity).state unit_of_measurement: '%'
icon: mdi:water-percent
lambda: return id(humidity).state;
update_interval: 60s update_interval: 60s
filters: filters:
- median: - median:
window_size: 360 window_size: 360
send_every: 1 send_every: 2
send_first_at: 1 send_first_at: 2
status_led:
pin:
number: D4
inverted: true
switch: switch:
- !include common/switch/restart.yaml - !include common/switch/restart.yaml

View File

@ -17,7 +17,7 @@ esphome:
binary_sensor: binary_sensor:
- !include common/binary_sensor/status.yaml - !include common/binary_sensor/status.yaml
- platform: gpio - platform: gpio
id: light_toggle id: light_button
pin: pin:
number: 12 number: 12
mode: INPUT_PULLUP mode: INPUT_PULLUP
@ -25,7 +25,7 @@ binary_sensor:
then: then:
- switch.toggle: light - switch.toggle: light
- platform: gpio - platform: gpio
id: heater_toggle id: fan_button
pin: pin:
number: 3 number: 3
mode: INPUT_PULLUP mode: INPUT_PULLUP
@ -38,7 +38,9 @@ sensor:
- !include common/sensor/wifi.yaml - !include common/sensor/wifi.yaml
status_led: status_led:
pin: 0 pin:
number: 0
inverted: true
switch: switch:
- !include common/switch/restart.yaml - !include common/switch/restart.yaml