more manual tweaks, and I really fucking need to stop and get groceries

This commit is contained in:
CeeWeasel
2025-07-20 13:24:38 -04:00
parent 75fb9c2ab8
commit 0baf98f917
6 changed files with 72 additions and 59 deletions
+3 -3
View File
@@ -16,6 +16,6 @@ ethernet:
dns1: !secret iot_default_dns1
dns2: !secret iot_default_dns2
#text_sensor:
#- <<: !include text_sensor/ethernet_ip_address.config.yaml
#- <<: !include text_sensor/ethernet_mac_address.config.yaml
text_sensor:
- <<: !include text_sensor/ethernet_ip_address.config.yaml
- <<: !include text_sensor/ethernet_mac_address.config.yaml
@@ -1,3 +1,4 @@
platform: uptime
name: Uptime
disabled_by_default: true
icon: mdi:timer-check
@@ -1,9 +1,5 @@
# Text sensors with general information.
platform: template
#ip_address:
name: IP
icon: mdi:ip-network
entity_category: diagnostic
platform: ethernet_info
ip_address:
name: "IP Address"
disabled_by_default: true
lambda: return {id(eth).get_ip_address().str() };
update_interval: 60s
@@ -1,9 +1,4 @@
# Text sensors with general information.
platform: template
#mac_address:
name: Ethernet MAC Address
platform: ethernet_info
mac_address:
name: MAC Address
disabled_by_default: true
icon: mdi:network
entity_category: diagnostic
lambda: return {esp_eth_get_mac.str() };
update_interval: 60s
@@ -0,0 +1,10 @@
# Text sensors with general information.
platform: ethernet_info
ip_address:
name: "IP Address"
icon: mdi:ip
disabled_by_default: true
mac_address:
name: MAC Address
icon: mdi:network
disabled_by_default: true
+42 -31
View File
@@ -31,6 +31,7 @@ esphome:
friendly_name: ${friendly_name}
name_add_mac_suffix: false
on_boot:
- priority: -100
then:
- lambda: |-
if (id(oled)) {
@@ -44,10 +45,10 @@ esp32:
framework:
type: esp-idf
web_server:
port: 80
version: 3
include_internal: true
# web_server:
# port: 80
# version: 3
# include_internal: true
# Enable logging
logger:
@@ -92,8 +93,9 @@ i2c:
sensor:
- platform: dallas_temp
address: 0xB33C01B607798528
name: "Return Temperature"
name: "Return"
id: hvac_return
icon: mdi:home-thermometer-outline
update_interval: 10s
filters:
- lambda: return x * (9.0/5.0) + 32.0;
@@ -102,8 +104,9 @@ sensor:
- platform: dallas_temp
address: 0x0F3C01B6070C1328
name: "Supply Temperature"
name: "Supply"
id: hvac_supply
icon: mdi:thermostat
update_interval: 10s
filters:
- lambda: return x * (9.0/5.0) + 32.0;
@@ -112,8 +115,9 @@ sensor:
- platform: dallas_temp
address: 0xFA3C01B607005B28
name: "Ambient Temperature"
name: "Ambient"
id: ambient
icon: mdi:home-thermometer
update_interval: 10s
filters:
- lambda: return x * (9.0/5.0) + 32.0;
@@ -121,8 +125,9 @@ sensor:
state_class: measurement
- platform: template
name: "Delta Temperature"
name: "Delta"
id: hvac_delta
icon: mdi:thermometer-lines
lambda: |-
return (id(hvac_supply).state - id(hvac_return).state);
update_interval: 10s
@@ -159,6 +164,8 @@ sensor:
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 - (id(ultrasonic_source).state)) * 100;'
@@ -173,6 +180,8 @@ sensor:
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 (id(ultrasonic_source).state) * 100;'
@@ -182,6 +191,8 @@ sensor:
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 (id(distance_from_bottom).state) / 17.5;'
@@ -207,27 +218,27 @@ binary_sensor:
name: "Door"
device_class: door
pin: ${door_pin}
filters:
- invert:
switch:
- platform: template
id: display_switch
name: "Display"
lambda: |-
if (id(screen_power)) {
if (id(oled_enabled)) {
id(oled).turn_on();
}
} else {
if (id(oled_enabled)) {
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
# 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();