Reorganize configs into packages

This commit is contained in:
2023-04-07 22:20:01 +02:00
parent b8666b87c6
commit 774ba71a86
14 changed files with 72 additions and 121 deletions
+1 -1
View File
@@ -8,4 +8,4 @@
**/src/ **/src/
**/platformio.ini **/platformio.ini
**/partitions.csv **/partitions.csv
/secrets.yaml secrets.yaml
+2 -18
View File
@@ -8,15 +8,8 @@ esphome:
includes: includes:
- zehnder.h - zehnder.h
esp8266: packages:
board: nodemcuv2 device_base: !include templates/esp8266.yaml
logger:
mqtt:
broker: homeassistant
username: esphome
password: !secret mqtt_password
dallas: dallas:
- pin: D1 - pin: D1
@@ -24,7 +17,6 @@ dallas:
sensor: sensor:
- platform: dallas - platform: dallas
address: 0x0401212E565C7428 address: 0x0401212E565C7428
name: "Bathroom Heater Temperature"
id: bathroom_heater_temperature id: bathroom_heater_temperature
remote_transmitter: remote_transmitter:
@@ -49,11 +41,3 @@ interval:
then: then:
# Periodically remind heater about the current setting. # Periodically remind heater about the current setting.
lambda: static_cast<Zehnder*>(id(bathroom_heater))->retransmit(); lambda: static_cast<Zehnder*>(id(bathroom_heater))->retransmit();
ota:
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
domain: ""
+4 -19
View File
@@ -8,16 +8,9 @@ esphome:
includes: includes:
- somfy.h - somfy.h
esp8266: packages:
board: nodemcuv2 device_base: !include templates/esp8266.yaml
mqtt: !include templates/mqtt.yaml
logger:
mqtt:
broker: homeassistant
username: esphome
password: !secret mqtt_password
id: mqtt_client
globals: globals:
- id: somfy_remote_id_base - id: somfy_remote_id_base
@@ -36,7 +29,7 @@ cover:
auto cover = new SomfyRTS( auto cover = new SomfyRTS(
rfPin, rfPin,
id(somfy_remote_id_base) + i, id(somfy_remote_id_base) + i,
id(mqtt_client)); id(mqtt_homeassistant));
blinds.push_back(cover); blinds.push_back(cover);
App.register_component(cover); App.register_component(cover);
} }
@@ -57,11 +50,3 @@ cover:
- name: "Living Room window" - name: "Living Room window"
- name: "Guest East window" - name: "Guest East window"
- name: "Guest East door" - name: "Guest East door"
ota:
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
domain: ""
+2 -18
View File
@@ -5,10 +5,8 @@ esphome:
name: dasfoo.boiler name: dasfoo.boiler
version: "1.0" version: "1.0"
esp8266: packages:
board: nodemcuv2 device_base: !include templates/esp8266.yaml
logger:
i2c: i2c:
sda: D3 sda: D3
@@ -36,11 +34,6 @@ display:
it.circle(112, 16, 12); it.circle(112, 16, 12);
} }
mqtt:
broker: homeassistant
username: esphome
password: !secret mqtt_password
dallas: dallas:
- pin: D1 - pin: D1
@@ -54,7 +47,6 @@ sensor:
- platform: adc - platform: adc
pin: A0 pin: A0
name: "Furnace LED brightness"
update_interval: 1s update_interval: 1s
id: furnace_led_brightness id: furnace_led_brightness
@@ -66,11 +58,3 @@ binary_sensor:
threshold: 0.7 threshold: 0.7
filters: filters:
- invert: - invert:
ota:
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
domain: ""
+2 -19
View File
@@ -6,14 +6,8 @@ esphome:
name: dasfoo.btproxy name: dasfoo.btproxy
version: "1.0" version: "1.0"
esp32: packages:
board: esp32-poe device_base: !include templates/esp32-poe.yaml
# Required for BLE.
framework:
type: esp-idf
# Enable logging.
logger:
# Allow HA to use our proxy. # Allow HA to use our proxy.
# Don't enable MQTT as the device will be "discovered" twice. # Don't enable MQTT as the device will be "discovered" twice.
@@ -33,14 +27,3 @@ bluetooth_proxy:
button: button:
- platform: restart - platform: restart
name: "btproxy Restart" name: "btproxy Restart"
ota:
password: !secret ota_password
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO17_OUT
phy_addr: 0
power_pin: GPIO12
+3 -24
View File
@@ -5,19 +5,9 @@ esphome:
name: dasfoo.ruuvi name: dasfoo.ruuvi
version: "1.0" version: "1.0"
esp32: packages:
board: esp32-poe device_base: !include templates/esp32-poe.yaml
# Required for BLE. mqtt: !include templates/mqtt.yaml
framework:
type: esp-idf
# Enable logging
logger:
mqtt:
broker: homeassistant
username: esphome
password: !secret mqtt_password
# Required for ruuvitag. # Required for ruuvitag.
esp32_ble_tracker: esp32_ble_tracker:
@@ -47,14 +37,3 @@ sensor:
name: "Outdoor West Acceleration" name: "Outdoor West Acceleration"
battery_voltage: battery_voltage:
name: "Outdoor West Sensor Battery Voltage" name: "Outdoor West Sensor Battery Voltage"
ota:
password: !secret ota_password
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO17_OUT
phy_addr: 0
power_pin: GPIO12
+1
View File
@@ -0,0 +1 @@
somfy_remote_id_base: "11111"
+21
View File
@@ -0,0 +1,21 @@
esp32:
board: esp32-poe
# Required for BLE.
framework:
type: esp-idf
status_led:
pin: GPIO2
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO17_OUT
phy_addr: 0
power_pin: GPIO12
logger:
packages:
ota: !include ota.yaml
+19
View File
@@ -0,0 +1,19 @@
esp8266:
board: nodemcuv2
packages:
wifi: !include wifi.yaml
ota: !include ota.yaml
mqtt: !include mqtt.yaml
logger:
status_led:
pin:
# There are 2 LEDs on NodeMCU v2, one next to the WiFi
# antenna, another near the power socket / RST button.
# The one at WiFi is connected to UART so it blinks on
# flash, thus we will use the other one for status.
# https://lowvoltage.github.io/2017/07/09/Onboard-LEDs-NodeMCU-Got-Two
number: GPIO16
inverted: true
+5
View File
@@ -0,0 +1,5 @@
mqtt:
broker: homeassistant
username: esphome
password: !secret mqtt_password
id: mqtt_homeassistant
+2
View File
@@ -0,0 +1,2 @@
ota:
password: !secret ota_password
+4
View File
@@ -0,0 +1,4 @@
wifi_ssid: IoT
wifi_password: "IoT$eKuRe"
ota_password: "OTA_ALS0_SECCUR"
mqtt_password: "ttqm"
+4
View File
@@ -0,0 +1,4 @@
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
domain: ""
+2 -22
View File
@@ -5,20 +5,8 @@ esphome:
name: dasfoo.watermeter name: dasfoo.watermeter
version: "1.0" version: "1.0"
esp8266: packages:
board: nodemcuv2 device_base: !include templates/esp8266.yaml
logger:
mqtt:
broker: homeassistant
username: esphome
password: !secret mqtt_password
status_led:
pin:
number: D4 # WiFi LED.
inverted: true
sensor: sensor:
- platform: pulse_meter - platform: pulse_meter
@@ -38,11 +26,3 @@ sensor:
unit_of_measurement: "L" unit_of_measurement: "L"
device_class: "water" device_class: "water"
state_class: "total_increasing" state_class: "total_increasing"
ota:
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
domain: ""