20260326
This commit is contained in:
3
esphome/common/connection/api.yaml
Normal file
3
esphome/common/connection/api.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
api:
|
||||
encryption:
|
||||
key: ${api_password}
|
||||
4
esphome/common/connection/ota.yaml
Normal file
4
esphome/common/connection/ota.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
ota:
|
||||
- platform: esphome
|
||||
id: my_ota
|
||||
password: ${ota_password}
|
||||
29
esphome/common/connection/wifi-sensor.yaml
Normal file
29
esphome/common/connection/wifi-sensor.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
sensor:
|
||||
- platform: wifi_signal
|
||||
name: "WiFi Signal "
|
||||
update_interval: 10s
|
||||
id: wifisignal
|
||||
|
||||
text_sensor:
|
||||
- platform: wifi_info
|
||||
ip_address:
|
||||
name: IP Address
|
||||
icon: mdi:wifi-strength-2
|
||||
id: ipaddr
|
||||
ssid:
|
||||
name: "Connected SSID"
|
||||
id: ssid
|
||||
icon: mdi:wifi-strength-2
|
||||
entity_category: diagnostic
|
||||
|
||||
bssid:
|
||||
name: "Connected BSSID"
|
||||
id: bssid
|
||||
icon: mdi:wifi-strength-2
|
||||
entity_category: diagnostic
|
||||
|
||||
mac_address:
|
||||
name: "WiFi Mac Address"
|
||||
id: macaddress
|
||||
icon: mdi:wifi-strength-2
|
||||
entity_category: diagnostic
|
||||
19
esphome/common/connection/wifi.yaml
Normal file
19
esphome/common/connection/wifi.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
wifi:
|
||||
networks:
|
||||
- ssid: ${wifi_ssid}
|
||||
password: ${wifi_password}
|
||||
# manual_ip:
|
||||
# static_ip: ${ip}
|
||||
# gateway: ${gateway}
|
||||
# subnet: ${subnet}
|
||||
# dns1: 192.169.2.15
|
||||
# dns2: 1.1.1.1
|
||||
# - ssid: ${wifi_ssid2}
|
||||
# password: ${wifi_password2}
|
||||
|
||||
#use_address: 192.168.2.235 #when changing fixed IP
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: ${device_name}
|
||||
password: ${wifi_password}
|
||||
@@ -1,18 +0,0 @@
|
||||
ota:
|
||||
- platform: esphome
|
||||
id: my_ota
|
||||
password: ${ota_password}
|
||||
|
||||
api:
|
||||
encryption:
|
||||
key: ${api_password}
|
||||
|
||||
|
||||
text_sensor:
|
||||
- platform: ethernet_info
|
||||
ip_address:
|
||||
name: ESP IP Address
|
||||
icon: mdi:ethernet
|
||||
entity_category: diagnostic
|
||||
|
||||
|
||||
@@ -1,61 +1,7 @@
|
||||
packages:
|
||||
api: !include connection/api.yaml
|
||||
ota: !include connection/ota.yaml
|
||||
wifi: !include connection/wifi.yaml
|
||||
sensor: !include connection/wifi-sensor.yaml
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
encryption:
|
||||
key: ${api_password}
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
id: my_ota
|
||||
password: ${ota_password}
|
||||
|
||||
wifi:
|
||||
networks:
|
||||
- ssid: ${wifi_ssid}
|
||||
password: ${wifi_password}
|
||||
manual_ip:
|
||||
static_ip: ${ip}
|
||||
gateway: ${gateway}
|
||||
subnet: ${subnet}
|
||||
dns1: 192.169.2.15
|
||||
dns2: 1.1.1.1
|
||||
- ssid: ${wifi_ssid2}
|
||||
password: ${wifi_password2}
|
||||
|
||||
#use_address: 192.168.2.235 #when changing fixed IP
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: ${device_name}
|
||||
password: ${wifi_password}
|
||||
|
||||
captive_portal:
|
||||
|
||||
sensor:
|
||||
- platform: wifi_signal
|
||||
name: "WiFi Signal "
|
||||
update_interval: 10s
|
||||
|
||||
text_sensor:
|
||||
- platform: wifi_info
|
||||
ip_address:
|
||||
name: IP Address
|
||||
icon: mdi:wifi-strength-2
|
||||
id: ipaddr
|
||||
ssid:
|
||||
name: "Connected SSID"
|
||||
id: ssid
|
||||
icon: mdi:wifi-strength-2
|
||||
entity_category: diagnostic
|
||||
|
||||
bssid:
|
||||
name: "Connected BSSID"
|
||||
id: bssid
|
||||
icon: mdi:wifi-strength-2
|
||||
entity_category: diagnostic
|
||||
|
||||
mac_address:
|
||||
name: "WiFi Mac Address"
|
||||
id: macaddress
|
||||
icon: mdi:wifi-strength-2
|
||||
entity_category: diagnostic
|
||||
captive_portal:
|
||||
19
esphome/common/wifi_P4.yaml
Normal file
19
esphome/common/wifi_P4.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
packages:
|
||||
api: !include connection/api.yaml
|
||||
ota: !include connection/ota.yaml
|
||||
wifi: !include connection/wifi.yaml
|
||||
#sensor: !include connection/wifi-sensor.yaml
|
||||
|
||||
esp32_hosted:
|
||||
variant: ESP32C6
|
||||
reset_pin: ${pin_esph_reset}
|
||||
cmd_pin: ${pin_esph_cmd}
|
||||
clk_pin: ${pin_esph_clk}
|
||||
d0_pin: ${pin_esph_d0}
|
||||
d1_pin: ${pin_esph_d1}
|
||||
d2_pin: ${pin_esph_d2}
|
||||
d3_pin: ${pin_esph_d3}
|
||||
active_high: true
|
||||
|
||||
|
||||
captive_portal:
|
||||
@@ -1,60 +1,14 @@
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
encryption:
|
||||
key: ${api_password}
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
id: my_ota
|
||||
password: ${ota_password}
|
||||
!include templates/api.yaml
|
||||
!include templates/ota.yaml
|
||||
!include templates/wifi.yaml
|
||||
!include sensors/wifi.yaml
|
||||
|
||||
wifi:
|
||||
networks:
|
||||
- ssid: ${wifi_ssid}
|
||||
password: ${wifi_password}
|
||||
manual_ip:
|
||||
static_ip: ${ip}
|
||||
gateway: ${gateway}
|
||||
subnet: ${subnet}
|
||||
dns1: 192.169.2.15
|
||||
dns2: 1.1.1.1
|
||||
- ssid: ${wifi_ssid2}
|
||||
password: ${wifi_password2}
|
||||
|
||||
# use_address: 192.168.2.63 #when changing fixed IP
|
||||
|
||||
ap:
|
||||
ssid: ${device_name}
|
||||
password: ${wifi_password}
|
||||
on_connect:
|
||||
- delay: 5s # Gives time for improv results to be transmitted
|
||||
- ble.disable:
|
||||
on_disconnect:
|
||||
- ble.enable:
|
||||
|
||||
|
||||
sensor:
|
||||
- platform: wifi_signal
|
||||
name: "WiFi Signal "
|
||||
update_interval: 10s
|
||||
|
||||
text_sensor:
|
||||
- platform: wifi_info
|
||||
ssid:
|
||||
name: "Connected SSID"
|
||||
id: ssid
|
||||
icon: mdi:wifi-strength-2
|
||||
entity_category: diagnostic
|
||||
|
||||
bssid:
|
||||
name: "Connected BSSID"
|
||||
id: bssid
|
||||
icon: mdi:wifi-strength-2
|
||||
entity_category: diagnostic
|
||||
|
||||
mac_address:
|
||||
name: "WiFi Mac Address"
|
||||
id: macaddress
|
||||
icon: mdi:wifi-strength-2
|
||||
entity_category: diagnostic
|
||||
@@ -1,29 +1,6 @@
|
||||
api:
|
||||
encryption:
|
||||
key: ${api_password}
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
id: my_ota
|
||||
password: ${ota_password}
|
||||
|
||||
wifi:
|
||||
networks:
|
||||
- ssid: ${wifi_ssid}
|
||||
password: ${wifi_password}
|
||||
manual_ip:
|
||||
static_ip: ${ip}
|
||||
gateway: ${gateway}
|
||||
subnet: ${subnet}
|
||||
dns1: 192.169.2.15
|
||||
dns2: 1.1.1.1
|
||||
- ssid: ${wifi_ssid2}
|
||||
password: ${wifi_password2}
|
||||
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: ${device_name}
|
||||
password: ${wifi_password}
|
||||
packages:
|
||||
api: !include connection/api.yaml
|
||||
ota: !include connection/ota.yaml
|
||||
wifi: !include connection/wifi.yaml
|
||||
|
||||
captive_portal:
|
||||
Reference in New Issue
Block a user