mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 11:00:14 -04:00
fixing boys room bright, some views, and a bunch of small fixes
This commit is contained in:
@@ -0,0 +1,198 @@
|
||||
substitutions:
|
||||
devicename: furnace-room-multisensor
|
||||
entity_name: furnace_room_multisensor
|
||||
friendly_name: Furnace Room MultiSensor
|
||||
comment: Clever MultiSensor
|
||||
board: nodemcuv2
|
||||
static_ip: !secret furnace-room-multisensor-ip
|
||||
|
||||
|
||||
# For the reed switches
|
||||
door: 35
|
||||
moisture: 36
|
||||
|
||||
# For the ultrasonic sensor
|
||||
trigger: 14
|
||||
echo: 15
|
||||
|
||||
# Infrared Sensor
|
||||
ir_tx: 12
|
||||
ir_rx: 39
|
||||
|
||||
# I2C Pins
|
||||
i2c_sda: 13
|
||||
i2c_scl: 16
|
||||
|
||||
# For the ethernet adapter
|
||||
ethernet_mdc_pin: 23
|
||||
ethernet_mdio_pin: 18
|
||||
ethernet_clk_pin: 0
|
||||
|
||||
# For the relays
|
||||
relay1: 32
|
||||
relay2: 33
|
||||
|
||||
# Built-in button
|
||||
button1: 34
|
||||
|
||||
# For the HVAC temperature sensors
|
||||
one_wire: 17
|
||||
|
||||
one_wire:
|
||||
- platform: gpio
|
||||
pin: ${one_wire}
|
||||
|
||||
esphome:
|
||||
name: ${devicename}
|
||||
friendly_name: ${friendly_name}
|
||||
name_add_mac_suffix: false
|
||||
|
||||
packages:
|
||||
network: !include common/olimex_evb.yaml
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
|
||||
# Included in common/olimex-evb.yaml
|
||||
# esp32:
|
||||
# board: esp32dev
|
||||
# framework:
|
||||
# type: esp-idf
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
version: 3
|
||||
include_internal: True
|
||||
|
||||
# # Enable Home Assistant API
|
||||
# api:
|
||||
# encryption:
|
||||
# key: "mupTLNBggWPdKHxBeY1yV47qXgyhVJUgIVVAvfGrZ40="
|
||||
|
||||
# ota:
|
||||
# - platform: esphome
|
||||
# password: "b43bd5c6f724d64a9bd4e92504830d8f"
|
||||
|
||||
remote_receiver:
|
||||
pin: ${ir_rx}
|
||||
dump: all
|
||||
|
||||
remote_transmitter:
|
||||
pin: ${ir_tx}
|
||||
carrier_duty_percent: 50%
|
||||
|
||||
i2c:
|
||||
sda: ${i2c_sda}
|
||||
scl: ${i2c_scl}
|
||||
scan: true
|
||||
id: bus_a
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: "ESP32-EVB button"
|
||||
pin: ${button1}
|
||||
|
||||
- platform: gpio
|
||||
name: "Door"
|
||||
device_class: door
|
||||
filters:
|
||||
- invert:
|
||||
pin:
|
||||
number: ${door}
|
||||
# mode: INPUT_PULLUP
|
||||
|
||||
- platform: gpio
|
||||
name: "Moisture"
|
||||
device_class: moisture
|
||||
pin:
|
||||
number: ${moisture}
|
||||
# mode: INPUT_PULLUP
|
||||
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: ${relay1}
|
||||
name: "Relay1"
|
||||
|
||||
- platform: gpio
|
||||
pin: ${relay2}
|
||||
name: "Relay2"
|
||||
|
||||
sensor:
|
||||
- platform: ultrasonic
|
||||
trigger_pin: ${trigger}
|
||||
echo_pin: ${echo}
|
||||
id: ultrasonic_source
|
||||
update_interval: 1s
|
||||
internal: True
|
||||
filters:
|
||||
- sliding_window_moving_average:
|
||||
window_size: 5
|
||||
send_every: 5
|
||||
send_first_at: 1
|
||||
- lambda: 'return round( x * 10.0) / 10.0;'
|
||||
- clamp:
|
||||
min_value: 0.0
|
||||
max_value: 150.0
|
||||
on_value:
|
||||
then:
|
||||
- sensor.template.publish:
|
||||
id: distance_from_bottom
|
||||
state: !lambda 'return id(ultrasonic_source).state;'
|
||||
|
||||
- sensor.template.publish:
|
||||
id: distance_from_top
|
||||
state: !lambda 'return id(ultrasonic_source).state;'
|
||||
|
||||
- platform: template
|
||||
unit_of_measurement: "cm"
|
||||
state_class: measurement
|
||||
id: distance_from_bottom
|
||||
name: "Salt Level in CM"
|
||||
icon: mdi:arrow-collapse-up
|
||||
disabled_by_default: true
|
||||
#update_interval: 5s
|
||||
filters:
|
||||
- lambda: 'return (0.94 - x) * 100;'
|
||||
- clamp:
|
||||
min_value: 0.0
|
||||
max_value: 150.0
|
||||
|
||||
on_value:
|
||||
then:
|
||||
- sensor.template.publish:
|
||||
id: level_in_bags
|
||||
state: !lambda 'return id(distance_from_bottom).state;'
|
||||
|
||||
- platform: template
|
||||
unit_of_measurement: "cm"
|
||||
state_class: measurement
|
||||
id: distance_from_top
|
||||
name: "Salt Level From Top in CM"
|
||||
icon: mdi:arrow-collapse-down
|
||||
disabled_by_default: true
|
||||
#update_interval: 5s
|
||||
filters:
|
||||
- lambda: 'return x * 100;'
|
||||
- round: 1
|
||||
- clamp:
|
||||
min_value: 0.0
|
||||
max_value: 150.0
|
||||
|
||||
|
||||
- platform: template
|
||||
unit_of_measurement: "bags"
|
||||
state_class: measurement
|
||||
id: level_in_bags
|
||||
name: "Salt Level in Bags"
|
||||
icon: mdi:counter
|
||||
disabled_by_default: true
|
||||
#update_interval: 5s
|
||||
filters:
|
||||
- lambda: 'return x / 17.5;'
|
||||
- round: 1
|
||||
- clamp:
|
||||
min_value: 0.0
|
||||
max_value: 10.0
|
||||
Reference in New Issue
Block a user