mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
Bunches of fixes nd changes
This commit is contained in:
@@ -8,11 +8,17 @@ substitutions:
|
||||
board: wemos_d1_mini32
|
||||
static_ip: !secret hvac-multisensor-ip
|
||||
|
||||
# For i2c devices
|
||||
# In this case it's just the display
|
||||
sda_pin: GPIO21
|
||||
scl_pin: GPIO22
|
||||
|
||||
door_pin: GPIO19
|
||||
one_wire_pin: GPIO14
|
||||
trigger_pin: GPIO04
|
||||
|
||||
one_wire_pin: GPIO26
|
||||
|
||||
# For the ultrasonic sensor
|
||||
trigger_pin: GPIO16
|
||||
echo_pin: GPIO13
|
||||
|
||||
#mdc_pin: GPIO23
|
||||
@@ -21,8 +27,8 @@ substitutions:
|
||||
#power_pin: GPIO5
|
||||
|
||||
packages:
|
||||
#wifi: !include common/wifi_no_power_save.yaml
|
||||
ethernet: !include common/ethernet.yaml
|
||||
# network: !include common/ethernet.yaml
|
||||
network: !include common/wifi.yaml
|
||||
device_base: !include common/device_base.yaml
|
||||
ble_proxy: !include common/ble_proxy.yaml
|
||||
|
||||
@@ -30,34 +36,14 @@ esphome:
|
||||
name: ${devicename}
|
||||
friendly_name: ${friendly_name}
|
||||
name_add_mac_suffix: false
|
||||
on_boot:
|
||||
- priority: -100
|
||||
then:
|
||||
- lambda: |-
|
||||
if (id(oled)) {
|
||||
id(oled_enabled) = true;
|
||||
} else {
|
||||
id(oled_enabled) = false;
|
||||
}
|
||||
|
||||
esp32:
|
||||
board: ${board}
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
# web_server:
|
||||
# port: 80
|
||||
# version: 3
|
||||
# include_internal: true
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
level: DEBUG
|
||||
logs:
|
||||
sensor: INFO
|
||||
component: INFO
|
||||
ultrasonic: INFO
|
||||
ethernet: DEBUG
|
||||
|
||||
api: # Using settings from common/device_base.yaml
|
||||
|
||||
@@ -74,13 +60,22 @@ globals:
|
||||
- id: screen_power
|
||||
type: bool
|
||||
restore_value: yes
|
||||
initial_value: 'true'
|
||||
initial_value: 'false'
|
||||
|
||||
font:
|
||||
- file: 'CascadiaMonoPL.ttf'
|
||||
- file: 'fonts/CascadiaMonoPL.ttf'
|
||||
id: font1
|
||||
size: 17
|
||||
|
||||
# - file: "gfonts://Roboto"
|
||||
# id: roboto_20
|
||||
# size: 20
|
||||
|
||||
# - file: "gfonts://Material+Symbols+Outlined"
|
||||
# id: icons_50
|
||||
# size: 50
|
||||
# glyphs: ["\U0000e425"] # mdi-timer
|
||||
|
||||
one_wire:
|
||||
- platform: gpio
|
||||
pin: ${one_wire_pin}
|
||||
@@ -142,7 +137,7 @@ sensor:
|
||||
trigger_pin: ${trigger_pin}
|
||||
echo_pin: ${echo_pin}
|
||||
id: ultrasonic_source
|
||||
#update_interval: 5s
|
||||
update_interval: 1s
|
||||
internal: True
|
||||
filters:
|
||||
- sliding_window_moving_average:
|
||||
@@ -221,24 +216,21 @@ binary_sensor:
|
||||
filters:
|
||||
- invert:
|
||||
|
||||
# switch:
|
||||
# - platform: template
|
||||
# id: display_switch
|
||||
# name: "Display"
|
||||
# lambda: |-
|
||||
# if (id(oled_enabled)) {
|
||||
# if (id(screen_power)) {
|
||||
# id(oled).turn_on();
|
||||
# } else {
|
||||
# id(oled).turn_off();
|
||||
# }
|
||||
# }
|
||||
# return id(screen_power);
|
||||
# turn_on_action:
|
||||
# - lambda: |-
|
||||
# id(screen_power) = true;
|
||||
# // id(oled).turn_on();
|
||||
# turn_off_action:
|
||||
# - lambda: |-
|
||||
# id(screen_power) = false;
|
||||
# // id(oled).turn_off();
|
||||
switch:
|
||||
- platform: template
|
||||
id: display_switch
|
||||
icon: mdi:console
|
||||
name: "Display"
|
||||
lambda: |-
|
||||
// if (id(screen_power)) {
|
||||
// id(oled).turn_on();
|
||||
// } else {
|
||||
// id(oled).turn_off();
|
||||
// }
|
||||
return id(screen_power);
|
||||
turn_on_action:
|
||||
- lambda: |-
|
||||
id(screen_power) = true;
|
||||
turn_off_action:
|
||||
- lambda: |-
|
||||
id(screen_power) = false;
|
||||
|
||||
Reference in New Issue
Block a user