From 544c4788b80a356672ba3c294105f0f20f6a7919 Mon Sep 17 00:00:00 2001 From: CeeWeasel Date: Sat, 23 Aug 2025 10:30:50 -0400 Subject: [PATCH] Update HVAC fan automation descriptions and improve HTTP configuration --- automations/climate/hvac_fan_off.yaml | 5 + automations/climate/hvac_fan_on.yaml | 5 + automations/people/goodnight_kids.yaml | 3 + components/packages/http.yaml | 65 ++++++----- .../packages/rtl_433_devices/rain_gauge.yaml | 109 +++++++++--------- components/switches/template.yaml | 4 + configuration.yaml | 32 +++++ esphome/common/olimex-evb.yaml | 19 ++- lovelace/view-overview.yaml | 2 +- 9 files changed, 155 insertions(+), 89 deletions(-) diff --git a/automations/climate/hvac_fan_off.yaml b/automations/climate/hvac_fan_off.yaml index 4a329f3..dd3c047 100644 --- a/automations/climate/hvac_fan_off.yaml +++ b/automations/climate/hvac_fan_off.yaml @@ -1,5 +1,10 @@ alias: HVAC Fan Off id: automation_hvac_fan_off +description: "Purposefully disabled because it just re-circulates the upstairs air" + # This shouldn't be used because it just re-circulates the air in the house. + # Since there aren't any returns in the basement, the upstairs air recirculates itself + # which accomplishes nothing + # I'd need to get some kind of fresh air intake and a damper trigger: # Has the fan been running for ten minutes? diff --git a/automations/climate/hvac_fan_on.yaml b/automations/climate/hvac_fan_on.yaml index f3d96eb..b279c4b 100644 --- a/automations/climate/hvac_fan_on.yaml +++ b/automations/climate/hvac_fan_on.yaml @@ -1,5 +1,10 @@ alias: HVAC Fan On id: automation_hvac_fan_on +description: "Purposefully disabled because it just re-circulates the upstairs air" + # This shouldn't be used because it just re-circulates the air in the house. + # Since there aren't any returns in the basement, the upstairs air recirculates itself + # which accomplishes nothing + # I'd need to get some kind of fresh air intake and a damper triggers: # Has the fan been off for ten minutes? diff --git a/automations/people/goodnight_kids.yaml b/automations/people/goodnight_kids.yaml index 3a0e990..65b8d40 100644 --- a/automations/people/goodnight_kids.yaml +++ b/automations/people/goodnight_kids.yaml @@ -170,6 +170,9 @@ action: - delay: "00:00:05" + - choose: + - conditions: "{{is_state('media_player.ytube_music_player','on')}}" + sequence: - service: media_player.turn_off target: entity_id: media_player.ytube_music_player diff --git a/components/packages/http.yaml b/components/packages/http.yaml index 9fc1a36..c8a90cd 100644 --- a/components/packages/http.yaml +++ b/components/packages/http.yaml @@ -1,31 +1,36 @@ -http: - #ssl_certificate: /ssl/origin.pem - #ssl_key: /ssl/privkey.pem - ip_ban_enabled: true - login_attempts_threshold: 5 - use_x_forwarded_for: true - trusted_proxies: - - 192.168.1.0/24 - - 127.0.0.1 - - 172.30.32.0/23 - - 172.16.0.0/12 - - 172.17.0.0/16 - - ::1 - - 172.21.0.145 +# Moved to configuration.yaml per Cloudflared addon docs: +# Documentation +# Document that http in configuration.yaml must no use !include or packages @felipecrs (#886) - # Add the Cloudflare IPs as trusted proxies https://www.cloudflare.com/ips-v4 - - 173.245.48.0/20 - - 103.21.244.0/22 - - 103.22.200.0/22 - - 103.31.4.0/22 - - 141.101.64.0/18 - - 108.162.192.0/18 - - 190.93.240.0/20 - - 188.114.96.0/20 - - 197.234.240.0/22 - - 198.41.128.0/17 - - 162.158.0.0/15 - - 104.16.0.0/13 - - 104.24.0.0/14 - - 172.64.0.0/13 - - 131.0.72.0/22 \ No newline at end of file + +# http: +# #ssl_certificate: /ssl/origin.pem +# #ssl_key: /ssl/privkey.pem +# ip_ban_enabled: true +# login_attempts_threshold: 5 +# use_x_forwarded_for: true +# trusted_proxies: +# - 192.168.1.0/24 +# - 127.0.0.1 +# - 172.30.32.0/23 +# - 172.16.0.0/12 +# - 172.17.0.0/16 +# - ::1 +# - 172.21.0.145 + +# # Add the Cloudflare IPs as trusted proxies https://www.cloudflare.com/ips-v4 +# - 173.245.48.0/20 +# - 103.21.244.0/22 +# - 103.22.200.0/22 +# - 103.31.4.0/22 +# - 141.101.64.0/18 +# - 108.162.192.0/18 +# - 190.93.240.0/20 +# - 188.114.96.0/20 +# - 197.234.240.0/22 +# - 198.41.128.0/17 +# - 162.158.0.0/15 +# - 104.16.0.0/13 +# - 104.24.0.0/14 +# - 172.64.0.0/13 +# - 131.0.72.0/22 \ No newline at end of file diff --git a/components/packages/rtl_433_devices/rain_gauge.yaml b/components/packages/rtl_433_devices/rain_gauge.yaml index de0611d..ea8cf26 100644 --- a/components/packages/rtl_433_devices/rain_gauge.yaml +++ b/components/packages/rtl_433_devices/rain_gauge.yaml @@ -1,55 +1,56 @@ -mqtt: - sensor: - - name: "Timestamp" - device_class: timestamp - icon: mdi:clock-in - state_topic: "rtl_433/9b13b3f4-rtl433/devices/EcoWitt-WH40/21917/time" - entity_category: diagnostic - unique_id: ecowitt-wh40-time - device: - identifiers: ecowitt-wh40 - name: Rain Gauge - model: WH40 - manufacturer: EcoWitt - - - name: "Precipitation" - device_class: precipitation - unit_of_measurement: "mm" - value_template: "{{ value|float }}" - state_class: measurement - state_topic: "rtl_433/9b13b3f4-rtl433/devices/EcoWitt-WH40/21917/rain_mm" - unique_id: ecowitt-wh40-rain-mm - device: - identifiers: ecowitt-wh40 - name: Rain Gauge - model: WH40 - manufacturer: EcoWitt - - - name: "Battery" - device_class: battery - unit_of_measurement: "%" - value_template: "{{ (float(value) / 1.5) * 100 | round(0) }}" - state_class: measurement - entity_category: diagnostic - state_topic: "rtl_433/9b13b3f4-rtl433/devices/EcoWitt-WH40/21917/battery_V" - unique_id: ecowitt-wh40-battery-v - device: - identifiers: ecowitt-wh40 - name: Rain Gauge - model: WH40 - manufacturer: EcoWitt - - binary_sensor: - - name: "Battery OK" - value_template: "{{ value|int }}" - device_class: problem - entity_category: diagnostic - state_topic: "rtl_433/9b13b3f4-rtl433/devices/EcoWitt-WH40/21917/battery_ok" - payload_on: "1" - payload_off: "0" - unique_id: ecowitt-wh40-battery-ok - device: - identifiers: ecowitt-wh40 - name: Rain Gauge - model: WH40 +mqtt: + sensor: + - name: "Timestamp" + device_class: timestamp + icon: mdi:clock-in + state_topic: "rtl_433/9b13b3f4-rtl433/devices/EcoWitt-WH40/21917/time" + entity_category: diagnostic + unique_id: ecowitt-wh40-time + device: + identifiers: ecowitt-wh40 + name: Rain Gauge + model: WH40 + manufacturer: EcoWitt + + - name: "Precipitation" + device_class: precipitation + unit_of_measurement: "mm" + value_template: "{{ value|float }}" + state_class: measurement + state_topic: "rtl_433/9b13b3f4-rtl433/devices/EcoWitt-WH40/21917/rain_mm" + unique_id: ecowitt-wh40-rain-mm + force_update: true # Enabling this to hopefully fix the trend sensor (binary_sensor.is_raining) + device: + identifiers: ecowitt-wh40 + name: Rain Gauge + model: WH40 + manufacturer: EcoWitt + + - name: "Battery" + device_class: battery + unit_of_measurement: "%" + value_template: "{{ (float(value) / 1.5) * 100 | round(0) }}" + state_class: measurement + entity_category: diagnostic + state_topic: "rtl_433/9b13b3f4-rtl433/devices/EcoWitt-WH40/21917/battery_V" + unique_id: ecowitt-wh40-battery-v + device: + identifiers: ecowitt-wh40 + name: Rain Gauge + model: WH40 + manufacturer: EcoWitt + + binary_sensor: + - name: "Battery OK" + value_template: "{{ value|int }}" + device_class: problem + entity_category: diagnostic + state_topic: "rtl_433/9b13b3f4-rtl433/devices/EcoWitt-WH40/21917/battery_ok" + payload_on: "1" + payload_off: "0" + unique_id: ecowitt-wh40-battery-ok + device: + identifiers: ecowitt-wh40 + name: Rain Gauge + model: WH40 manufacturer: EcoWitt \ No newline at end of file diff --git a/components/switches/template.yaml b/components/switches/template.yaml index f466034..161a1c7 100644 --- a/components/switches/template.yaml +++ b/components/switches/template.yaml @@ -2,6 +2,10 @@ platform: template switches: thermostat_fan_mode: unique_id: templateswitch.thermostat_fan_mode + # This shouldn't be used because it just re-circulates the air in the house. + # Since there aren't any returns in the basement, the upstairs air recirculates itself + # which accomplishes nothing + # I'd need to get some kind of fresh air intake and a damper friendly_name: "Thermostat Fan Mode" value_template: >- {% if state_attr('climate.thermostat', 'fan_min_on_time') | int(default=0) < 5 %} diff --git a/configuration.yaml b/configuration.yaml index 78f5b27..f9c847f 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -43,3 +43,35 @@ homeassistant: - 127.0.0.1 - ::1 - 172.21.0.0/24 + +http: + #ssl_certificate: /ssl/origin.pem + #ssl_key: /ssl/privkey.pem + ip_ban_enabled: true + login_attempts_threshold: 5 + use_x_forwarded_for: true + trusted_proxies: + - 192.168.1.0/24 + - 127.0.0.1 + - 172.30.32.0/23 + - 172.16.0.0/12 + - 172.17.0.0/16 + - ::1 + - 172.21.0.145 + + # Add the Cloudflare IPs as trusted proxies https://www.cloudflare.com/ips-v4 + - 173.245.48.0/20 + - 103.21.244.0/22 + - 103.22.200.0/22 + - 103.31.4.0/22 + - 141.101.64.0/18 + - 108.162.192.0/18 + - 190.93.240.0/20 + - 188.114.96.0/20 + - 197.234.240.0/22 + - 198.41.128.0/17 + - 162.158.0.0/15 + - 104.16.0.0/13 + - 104.24.0.0/14 + - 172.64.0.0/13 + - 131.0.72.0/22 diff --git a/esphome/common/olimex-evb.yaml b/esphome/common/olimex-evb.yaml index 9538845..edb6a43 100644 --- a/esphome/common/olimex-evb.yaml +++ b/esphome/common/olimex-evb.yaml @@ -1,16 +1,27 @@ +esp32: + board: esp32-evb + framework: + #type: arduino + type: esp-idf + ethernet: id: eth type: LAN8720 mdc_pin: GPIO23 mdio_pin: GPIO18 - clk_mode: GPIO0_IN + clk: + pin: GPIO0 + mode: CLK_EXT_IN phy_addr: 0 + use_address: ${devicename}.local + manual_ip: static_ip: ${static_ip} gateway: !secret iot_default_gateway subnet: !secret iot_subnet_mask + 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 \ No newline at end of file +text_sensor: + - <<: !include text_sensor/ethernet_info.config.yaml \ No newline at end of file diff --git a/lovelace/view-overview.yaml b/lovelace/view-overview.yaml index 01eaa82..8aad801 100644 --- a/lovelace/view-overview.yaml +++ b/lovelace/view-overview.yaml @@ -519,7 +519,7 @@ badges: icon: mdi:speaker-multiple tap_action: action: navigate - navigation_path: /phone-yaml/media + navigation_path: /lovelace-yaml/media content: "{{states('sensor.speakers_on_count')}}" hold_action: action: more-info