so many freaking changes!

This commit is contained in:
CeeWeasel
2025-11-21 09:42:43 -05:00
parent 2e0a197b4d
commit 7b8fbb063e
104 changed files with 9183 additions and 2432 deletions
+112 -123
View File
@@ -1,3 +1,4 @@
# 3v3 en svp sun 34 35 32 33 25 26 27 14 12 gnd 13 sd2 sd3 gnd 5v
substitutions:
devicename: furnace-room-multisensor
entity_name: furnace_room_multisensor
@@ -6,126 +7,42 @@ substitutions:
board: nodemcuv2
static_ip: !secret furnace-room-multisensor-ip
moisture: D1
door: D2
one_wire: D5
ultrasonic_trigger: D6
ultrasonic_echo: D7
# 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}
packages:
network: !include common/wifi.yaml
device_base: !include common/device_base.yaml
web_server: !include common/web_server.yaml
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
esp8266:
board: ${board}
# Enable logging
logger:
web_server:
port: 80
version: 3
include_internal: True
api: # Using settings from common/device_base.yaml
# # Enable Home Assistant API
# api:
# encryption:
# key: "mupTLNBggWPdKHxBeY1yV47qXgyhVJUgIVVAvfGrZ40="
ota: # Using settings from common/device_base.yaml
# 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:
one_wire:
- 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"
pin: ${one_wire}
sensor:
- platform: ultrasonic
trigger_pin: ${trigger}
echo_pin: ${echo}
trigger_pin: ${ultrasonic_trigger}
echo_pin: ${ultrasonic_echo}
id: ultrasonic_source
update_interval: 1s
update_interval: 60s
internal: True
filters:
- sliding_window_moving_average:
@@ -136,17 +53,9 @@ sensor:
- 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
- platform: copy
source_id: ultrasonic_source
unit_of_measurement: "cm"
state_class: measurement
id: distance_from_bottom
@@ -160,13 +69,8 @@ sensor:
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
- platform: copy
source_id: ultrasonic_source
unit_of_measurement: "cm"
state_class: measurement
id: distance_from_top
@@ -180,9 +84,9 @@ sensor:
- clamp:
min_value: 0.0
max_value: 150.0
- platform: template
- platform: copy
source_id: distance_from_bottom
unit_of_measurement: "bags"
state_class: measurement
id: level_in_bags
@@ -195,4 +99,89 @@ sensor:
- round: 1
- clamp:
min_value: 0.0
max_value: 10.0
max_value: 10.0
- platform: dallas_temp
address: 0x5a3c01d6078a2e28
name: "Probe 1"
id: probe1
device_class: "temperature"
update_interval: 5s
filters:
- lambda: return x * (9.0/5.0) + 32.0;
- clamp:
min_value: 0.0
max_value: 150.0
- round: 2
- or:
- throttle: 60s
- delta: 1.0
unit_of_measurement: "°F"
state_class: measurement
- platform: dallas_temp
address: 0x6b3c01d6077bbb28
name: "Probe 2"
id: probe2
device_class: "temperature"
update_interval: 5s
filters:
- clamp:
min_value: 0.0
max_value: 150.0
- or:
- throttle: 60s
- delta: 1.0
- lambda: return round( (x * (9.0/5.0) + 32.0) * 100.0) / 100.0;
unit_of_measurement: "°F"
state_class: measurement
- platform: dallas_temp
address: 0x2a3c01d6073e0728
name: "Probe 3"
id: probe3
device_class: "temperature"
update_interval: 5s
filters:
- lambda: return round( (x * (9.0/5.0) + 32.0) * 100.0) / 100.0;
- clamp:
min_value: 0.0
max_value: 150.0
- or:
- throttle: 60s
- delta: 1.0
accuracy_decimals: 2
unit_of_measurement: "°F"
state_class: measurement
- platform: template
name: "Delta"
id: hvac_delta
icon: mdi:thermometer-lines
lambda: |-
return id(probe1).state - id(probe2).state;
update_interval: 10s
unit_of_measurement: "°F"
state_class: measurement
device_class: ""
accuracy_decimals: 2
filters:
- or:
- throttle: 60s
- delta: 1.0
binary_sensor:
- platform: gpio
name: "Door"
device_class: door
pin:
number: ${door}
mode: INPUT_PULLUP
- platform: gpio
name: "Leak"
device_class: moisture
pin:
number: ${moisture}
mode: INPUT_PULLUP
inverted: true