This commit is contained in:
2024-05-23 21:24:52 +02:00
commit a3efe8274b
166 changed files with 15713 additions and 0 deletions

Submodule common/.esphome/external_components/b7dc7eea added at 16571e8a90

4
common/api.yaml Normal file
View File

@@ -0,0 +1,4 @@
api:
encryption:
key: !secret api_key
reboot_timeout: 0s

View File

@@ -0,0 +1,3 @@
---
platform: status
name: "${name} Status"

View File

@@ -0,0 +1,3 @@
---
platform: factory_reset
name: ${name} Factory Defaults

View File

@@ -0,0 +1,3 @@
---
platform: restart
name: ${name} Restart

View File

@@ -0,0 +1,3 @@
---
platform: safe_mode
name: ${name} Restart (Safe Mode)

View File

@@ -0,0 +1,3 @@
---
platform: shutdown
name: ${name} Shutdown

22
common/common.yaml Normal file
View File

@@ -0,0 +1,22 @@
---
<<: !include wifi.yaml
<<: !include api.yaml
<<: !include ota.yaml
<<: !include logger.yaml
binary_sensor:
- <<: !include binary_sensor/status.yaml
button:
- <<: !include button/factory_reset.yaml
- <<: !include button/restart.yaml
- <<: !include button/safe_mode.yaml
- <<: !include button/shutdown.yaml
sensor:
- <<: !include sensor/uptime.yaml
- <<: !include sensor/wifi_signal.yaml
text_sensor:
- <<: !include text_sensor/version.yaml
- <<: !include text_sensor/wifi_info.yaml

30
common/common_dev.yaml Normal file
View File

@@ -0,0 +1,30 @@
---
<<: !include wifi_dev.yaml
<<: !include api.yaml
<<: !include ota.yaml
#<<: !include logger.yaml
<<: !include logger_debug.yaml
binary_sensor:
- <<: !include binary_sensor/status.yaml
button:
- <<: !include button/factory_reset.yaml
- <<: !include button/restart.yaml
- <<: !include switch/safe_mode.yaml
- <<: !include switch/shutdown.yaml
sensor:
# - <<: !include sensor/debug.yaml
- <<: !include sensor/uptime.yaml
- <<: !include sensor/wifi_signal.yaml
#switch:
# - <<: !include switch/restart.yaml
# - <<: !include switch/safe_mode.yaml
# - <<: !include switch/shutdown.yaml
text_sensor:
- <<: !include text_sensor/debug.yaml
- <<: !include text_sensor/version.yaml
- <<: !include text_sensor/wifi_info.yaml

27
common/common_eth.yaml Normal file
View File

@@ -0,0 +1,27 @@
---
<<: !include api.yaml
<<: !include ota.yaml
# <<: !include logger_debug.yaml
<<: !include ethernet.yaml
binary_sensor:
- <<: !include binary_sensor/status.yaml
button:
- <<: !include button/restart.yaml
- <<: !include switch/safe_mode.yaml
- <<: !include switch/shutdown.yaml
sensor:
- <<: !include sensor/uptime.yaml
# - <<: !include sensor/free_heap.yaml
#switch:
# - <<: !include switch/restart.yaml
# - <<: !include switch/safe_mode.yaml
# - <<: !include switch/shutdown.yaml
text_sensor:
# - <<: !include text_sensor/debug.yaml
# - <<: !include text_sensor/version.yaml
- <<: !include text_sensor/ethernet_info.yaml

21
common/common_min.yaml Normal file
View File

@@ -0,0 +1,21 @@
---
<<: !include wifi.yaml
<<: !include api.yaml
<<: !include ota.yaml
<<: !include logger.yaml
#binary_sensor:
# - <<: !include binary_sensor/status.yaml
#button:
# - <<: !include button/restart.yaml
# - <<: !include switch/safe_mode.yaml
# - <<: !include switch/shutdown.yaml
#sensor:
# - <<: !include sensor/uptime.yaml
# - <<: !include sensor/wifi_signal.yaml
#text_sensor:
# - <<: !include text_sensor/version.yaml
# - <<: !include text_sensor/wifi_info.yaml

View File

@@ -0,0 +1,34 @@
---
<<: !include wifi.yaml
<<: !include api.yaml
<<: !include ota.yaml
<<: !include logger.yaml
# <<: !include logger_debug.yaml
external_components:
- source: github://RoboMagus/esphome-gitref-sensor
binary_sensor:
- <<: !include binary_sensor/status.yaml
button:
- <<: !include button/factory_reset.yaml
- <<: !include button/restart.yaml
- <<: !include switch/safe_mode.yaml
- <<: !include switch/shutdown.yaml
sensor:
# - <<: !include sensor/debug.yaml
- <<: !include sensor/uptime.yaml
- <<: !include sensor/wifi_signal.yaml
#switch:
# - <<: !include switch/restart.yaml
# - <<: !include switch/safe_mode.yaml
# - <<: !include switch/shutdown.yaml
text_sensor:
# - <<: !include text_sensor/debug.yaml
- <<: !include text_sensor/git_ref.yaml
- <<: !include text_sensor/version.yaml
- <<: !include text_sensor/wifi_info.yaml

8
common/ethernet.yaml Normal file
View File

@@ -0,0 +1,8 @@
---
ethernet:
type: LAN8720
mdc_pin: 23
mdio_pin: 18
clk_mode: GPIO17_OUT
phy_addr: 0
power_pin: 12

3
common/logger.yaml Normal file
View File

@@ -0,0 +1,3 @@
---
logger:
# level: DEBUG

5
common/logger_debug.yaml Normal file
View File

@@ -0,0 +1,5 @@
---
debug:
logger:
level: debug

4
common/ota.yaml Normal file
View File

@@ -0,0 +1,4 @@
---
ota:
- platform: esphome
password: !secret ota_password

2
common/secrets.yaml Normal file
View File

@@ -0,0 +1,2 @@
---
<<: !include ../secrets.yaml

10
common/sensor/debug.yaml Normal file
View File

@@ -0,0 +1,10 @@
---
platform: debug
free:
name: "${name} Heap Free"
fragmentation:
name: "${name} Heap Fragmentation"
block:
name: "${name} Heap Max Block"
loop_time:
name: "${name} Loop Time"

View File

@@ -0,0 +1,9 @@
---
platform: template
name: ${name} Free heap
lambda: return heap_caps_get_free_size(MALLOC_CAP_INTERNAL);
icon: "mdi:memory"
entity_category: diagnostic
state_class: measurement
unit_of_measurement: "b"
update_interval: 60s

View File

@@ -0,0 +1,9 @@
---
platform: uptime
name: ${name} Uptime
unit_of_measurement: "days"
accuracy_decimals: 2
update_interval: 60s
filters:
- lambda: return x / 86400;

View File

@@ -0,0 +1,4 @@
---
platform: wifi_signal
name: "${name} WiFi Signal"
update_interval: 60s

View File

@@ -0,0 +1,3 @@
---
platform: restart
name: ${name} Restart

View File

@@ -0,0 +1,3 @@
---
platform: safe_mode
name: ${name} Restart (Safe Mode)

View File

@@ -0,0 +1,3 @@
---
platform: shutdown
name: ${name} Shutdown

View File

@@ -0,0 +1,6 @@
---
platform: debug
device:
name: "${name} Device Info"
reset_reason:
name: "${name} Reset Reason"

View File

@@ -0,0 +1,4 @@
---
platform: ethernet_info
ip_address:
name: ${name} IP Address

View File

@@ -0,0 +1,7 @@
---
platform: git_ref
name: "${name} Git Ref"
long: true
all: true
abbrev: 16
dirty: "-dirty"

View File

@@ -0,0 +1,3 @@
---
platform: version
name: "${name} Version"

View File

@@ -0,0 +1,13 @@
---
platform: wifi_info
ip_address:
name: ${name} IP Address
icon: mdi:ip-network
#ssid:
# name: ${name} SSID
#bssid:
# name: ${name} BSSID
mac_address:
name: ${name} MAC
#scan_results:
# name: ${name} Latest Scan Results

View File

@@ -0,0 +1,4 @@
---
platform: homeassistant
id: ha_time
timezone: Europe/Bratislava

7
common/wifi.yaml Normal file
View File

@@ -0,0 +1,7 @@
---
wifi:
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
# enable_btm: true
# enable_rrm: true

10
common/wifi_dev.yaml Normal file
View File

@@ -0,0 +1,10 @@
---
wifi:
networks:
- ssid: TEST
password: test'test
# enable_btm: true
# enable_rrm: true
ap:
ssid: TEST
password: testtest