Update to Folder Structure Required by ESPHome Container (#43)

* Move device files from devices folder to root
* Update relative file references to match new relative paths
* Update README with new folder structure
This commit is contained in:
Chris Nussbaum 2023-02-15 13:42:51 -06:00 committed by GitHub
parent 557dae7ffc
commit 5bc7f2d661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
45 changed files with 57 additions and 58 deletions

View File

@ -10,14 +10,14 @@ Home Assistant is open source home automation that puts local control and privac
## Folder Structure
* `build` - Technically not included in the repo but all of my devices are configured with this as their build path
* `components` - Custom components
* `custom` - Other custom code that are not components
* `devices` - Yaml files for my devices
* `images` - Pictures of some of my devices
* `other` - Other misc files
* `packages` - Shared packages used by my devices
* `scripts` - Couple of PowerShell scripts for managing the repo
* `/` - Yaml files for my devices and other core files
* `/build` - Technically not included in the repo but all of my devices are configured with this as their build path
* `/components` - Custom components
* `/custom` - Other custom code that are not components
* `/images` - Pictures of some of my devices
* `/other` - Other misc files
* `/packages` - Shared packages used by my devices
* `/scripts` - Couple of PowerShell scripts for managing the repo
## Secrets Management
@ -30,7 +30,7 @@ I have been working on updating most of my custom code into components that can
### Binary Light With Power
This an enhanced version of the standard [binary light](https://esphome.io/components/light/binary.html) component that adds an option to include a sensor to report current power usage based on a configured wattage of the light(s) it controls. More details on how to use this component are available [here](./components/binary_light_with_power/README.md).
### GPIO Light With Power
### GPIO Switch With Power
This an enhanced version of the standard [gpio switch](https://esphome.io/components/switch/gpio.html) component that adds an option to include a sensor to report current power usage based on a configured wattage of the device(s) it controls. More details on how to use this component are available [here](./components/gpio_switch_with_power/README.md).
### Pool Controller

View File

@ -8,12 +8,12 @@ substitutions:
ap_wifi_pwd: !secret basement-bathroom-light-fan-ap-pwd
packages:
device_base: !include ../packages/device_base_esp8266.yaml
device_base: !include ./packages/device_base_esp8266.yaml
external_components:
- source:
type: local
path: ../components
path: ./components
components: [ binary_light_with_power ]
binary_sensor:

View File

@ -8,7 +8,7 @@ substitutions:
ap_wifi_pwd: !secret basement-bathroom-sensor-ap-pwd
packages:
device_base: !include ../packages/device_base_esp8266.yaml
device_base: !include ./packages/device_base_esp8266.yaml
esphome:
on_boot:

View File

@ -8,12 +8,12 @@ substitutions:
ap_wifi_pwd: !secret basement-bathroom-shower-light-heater-ap-pwd
packages:
device_base: !include ../packages/device_base_esp8266.yaml
device_base: !include ./packages/device_base_esp8266.yaml
external_components:
- source:
type: local
path: ../components
path: ./components
components: [ binary_light_with_power, gpio_switch_with_power ]
binary_sensor:

View File

@ -7,4 +7,4 @@ substitutions:
ap_wifi_pwd: !secret basement-fridge-ap-pwd
packages:
feit_dimmer: !include ../packages/topgreener_smart_plug.yaml
feit_dimmer: !include ./packages/topgreener_smart_plug.yaml

View File

@ -15,7 +15,7 @@ script:
entity_id: switch.basement_tv, switch.xbox, light.basement_tv, light.basement, light.bar, switch.pool_table_light, light.basement_bathroom_light, light.basement_shower_light
packages:
feit_dimmer: !include ../packages/feit_dimmer.yaml
feit_dimmer: !include ./packages/feit_dimmer.yaml
light:
- platform: tuya_light_plus

View File

@ -15,7 +15,7 @@ script:
entity_id: switch.basement_tv, switch.xbox, light.basement_tv, light.basement, light.bar, switch.pool_table_light, light.basement_bathroom_light, light.basement_shower_light
packages:
feit_dimmer: !include ../packages/feit_dimmer_without_power.yaml
feit_dimmer: !include ./packages/feit_dimmer_without_power.yaml
light:
- platform: tuya_light_plus

View File

@ -7,4 +7,4 @@ substitutions:
ap_wifi_pwd: !secret basement-tv-ap-pwd
packages:
feit_dimmer: !include ../packages/topgreener_smart_plug.yaml
feit_dimmer: !include ./packages/topgreener_smart_plug.yaml

View File

@ -8,7 +8,7 @@ substitutions:
ap_wifi_pwd: !secret coffee-maker-ap-pwd
packages:
device_base: !include ../packages/device_base_esp8266.yaml
device_base: !include ./packages/device_base_esp8266.yaml
binary_sensor:
- platform: gpio

View File

@ -7,7 +7,7 @@ substitutions:
ap_wifi_pwd: !secret computer-light-ap-pwd
packages:
feit_dimmer: !include ../packages/feit_dimmer.yaml
feit_dimmer: !include ./packages/feit_dimmer.yaml
light:
- platform: tuya_light_plus

0
devices/.gitignore vendored
View File

View File

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

View File

@ -7,7 +7,7 @@ substitutions:
ap_wifi_pwd: !secret dining-room-light-ap-pwd
packages:
feit_dimmer: !include ../packages/feit_dimmer.yaml
feit_dimmer: !include ./packages/feit_dimmer.yaml
light:
- platform: tuya_light_plus

View File

@ -8,7 +8,7 @@ substitutions:
ap_wifi_pwd: !secret emporia-vue2-ap-pwd
packages:
device_base: !include ../packages/device_base_esp32.yaml
device_base: !include ./packages/device_base_esp32.yaml
wifi:
power_save_mode: light

View File

@ -7,7 +7,7 @@ substitutions:
ap_wifi_pwd: !secret family-room-light-ap-pwd
packages:
feit_dimmer: !include ../packages/feit_dimmer.yaml
feit_dimmer: !include ./packages/feit_dimmer.yaml
light:
- platform: tuya_light_plus

View File

@ -7,4 +7,4 @@ substitutions:
ap_wifi_pwd: !secret family-room-tv-ap-pwd
packages:
feit_dimmer: !include ../packages/topgreener_smart_plug.yaml
feit_dimmer: !include ./packages/topgreener_smart_plug.yaml

View File

@ -8,7 +8,7 @@ substitutions:
ap_wifi_pwd: !secret fire-pit-fountain-ap-pwd
packages:
device_base: !include ../packages/device_base_esp8266.yaml
device_base: !include ./packages/device_base_esp8266.yaml
binary_sensor:
- platform: gpio

View File

@ -7,7 +7,7 @@ substitutions:
ap_wifi_pwd: !secret front-entry-lights-ap-pwd
packages:
feit_dimmer: !include ../packages/feit_dimmer.yaml
feit_dimmer: !include ./packages/feit_dimmer.yaml
light:
- platform: tuya_light_plus

View File

@ -7,7 +7,7 @@ substitutions:
ap_wifi_pwd: !secret front-entry-lights-2-ap-pwd
packages:
feit_dimmer: !include ../packages/feit_dimmer_without_power.yaml
feit_dimmer: !include ./packages/feit_dimmer_without_power.yaml
light:
- platform: tuya_light_plus

View File

@ -7,7 +7,7 @@ substitutions:
ap_wifi_pwd: !secret front-lights-ap-pwd
packages:
feit_dimmer: !include ../packages/feit_dimmer.yaml
feit_dimmer: !include ./packages/feit_dimmer.yaml
light:
- platform: tuya_light_plus

View File

@ -9,7 +9,7 @@ substitutions:
log_baud_rate: '0'
packages:
device_base: !include ../packages/device_base_esp32.yaml
device_base: !include ./packages/device_base_esp32.yaml
wifi:
power_save_mode: light

View File

@ -8,4 +8,4 @@ substitutions:
light_wattage: '378'
packages:
shelly_1l: !include ../packages/shelly_1l.yaml
shelly_1l: !include ./packages/shelly_1l.yaml

View File

@ -7,7 +7,7 @@ substitutions:
ap_wifi_pwd: !secret kitchen-bar-lights-ap-pwd
packages:
feit_dimmer: !include ../packages/feit_dimmer.yaml
feit_dimmer: !include ./packages/feit_dimmer.yaml
light:
- platform: tuya_light_plus

View File

@ -7,4 +7,4 @@ substitutions:
ap_wifi_pwd: !secret kitchen-fridge-ap-pwd
packages:
feit_dimmer: !include ../packages/topgreener_smart_plug.yaml
feit_dimmer: !include ./packages/topgreener_smart_plug.yaml

View File

@ -7,7 +7,7 @@ substitutions:
ap_wifi_pwd: !secret kitchen-table-light-ap-pwd
packages:
feit_dimmer: !include ../packages/feit_dimmer.yaml
feit_dimmer: !include ./packages/feit_dimmer.yaml
light:
- platform: tuya_light_plus

View File

@ -7,7 +7,7 @@ substitutions:
ap_wifi_pwd: !secret living-room-lights-ap-pwd
packages:
feit_dimmer: !include ../packages/feit_dimmer.yaml
feit_dimmer: !include ./packages/feit_dimmer.yaml
light:
- platform: tuya_light_plus

View File

@ -8,4 +8,4 @@ substitutions:
fan_wattage: "26.6"
packages:
device_base: !include ../packages/feit_dimmer_as_fan.yaml
device_base: !include ./packages/feit_dimmer_as_fan.yaml

View File

@ -8,7 +8,7 @@ substitutions:
ap_wifi_pwd: !secret master-bath-hum-temp-sensor-ap-pwd
packages:
device_base: !include ../packages/device_base_esp8266.yaml
device_base: !include ./packages/device_base_esp8266.yaml
binary_sensor:
- platform: template

View File

@ -7,7 +7,7 @@ substitutions:
ap_wifi_pwd: !secret master-bath-lights-ap-pwd
packages:
feit_dimmer: !include ../packages/feit_dimmer.yaml
feit_dimmer: !include ./packages/feit_dimmer.yaml
light:
- platform: tuya_light_plus

View File

@ -7,7 +7,7 @@ substitutions:
ap_wifi_pwd: !secret master-bath-lights-2-ap-pwd
packages:
feit_dimmer: !include ../packages/feit_dimmer_without_power.yaml
feit_dimmer: !include ./packages/feit_dimmer_without_power.yaml
light:
- platform: tuya_light_plus

View File

@ -8,7 +8,7 @@ substitutions:
ap_wifi_pwd: !secret master-bed-ap-pwd
packages:
device_base: !include ../packages/device_base_esp8266.yaml
device_base: !include ./packages/device_base_esp8266.yaml
esphome:
includes:

View File

@ -7,4 +7,4 @@ substitutions:
ap_wifi_pwd: !secret network-equipment-ap-pwd
packages:
feit_dimmer: !include ../packages/topgreener_smart_plug.yaml
feit_dimmer: !include ./packages/topgreener_smart_plug.yaml

View File

@ -7,7 +7,7 @@ substitutions:
ap_wifi_pwd: !secret office-light-ap-pwd
packages:
feit_dimmer: !include ../packages/feit_dimmer.yaml
feit_dimmer: !include ./packages/feit_dimmer.yaml
light:
- platform: tuya_light_plus

View File

@ -4,7 +4,7 @@ substitutions:
external_components:
- source:
type: local
path: ../components
path: ./components
components: [ tuya_light_plus ]
packages:

View File

@ -5,7 +5,7 @@ substitutions:
external_components:
- source:
type: local
path: ../components
path: ./components
components: [ tuya_dimmer_as_fan ]
packages:

View File

@ -4,7 +4,7 @@ substitutions:
external_components:
- source:
type: local
path: ../components
path: ./components
components: [ tuya_light_plus ]
packages:

View File

@ -5,7 +5,7 @@ substitutions:
external_components:
- source:
type: local
path: ../components
path: ./components
components: [ binary_light_with_power ]
packages:

View File

@ -8,12 +8,12 @@ substitutions:
ap_wifi_pwd: !secret patio-lights-ap-pwd
packages:
device_base: !include ../packages/device_base_esp8266.yaml
device_base: !include ./packages/device_base_esp8266.yaml
external_components:
- source:
type: local
path: ../components
path: ./components
components: [ binary_light_with_power ]
light:

View File

@ -8,12 +8,12 @@ substitutions:
ap_wifi_pwd: !secret pool-and-patio-lights-ap-pwd
packages:
device_base: !include ../packages/device_base_esp8266.yaml
device_base: !include ./packages/device_base_esp8266.yaml
external_components:
- source:
type: local
path: ../components
path: ./components
components: [ treo_led_pool_light, binary_light_with_power ]
binary_sensor:

View File

@ -8,12 +8,12 @@ substitutions:
ap_wifi_pwd: !secret pool-pumps-ap-pwd
packages:
device_base: !include ../packages/device_base_esp8266.yaml
device_base: !include ./packages/device_base_esp8266.yaml
external_components:
- source:
type: local
path: ../components
path: ./components
components: [ pool_controller ]
i2c:

View File

@ -3,4 +3,4 @@ substitutions:
device_name: Scripture of the Day Mayson
packages:
device_base: !include ../packages/scripture_of_the_day.yaml
device_base: !include ./packages/scripture_of_the_day.yaml

View File

@ -3,4 +3,4 @@ substitutions:
device_name: Scripture of the Day Melissa
packages:
device_base: !include ../packages/scripture_of_the_day.yaml
device_base: !include ./packages/scripture_of_the_day.yaml

View File

@ -15,8 +15,8 @@ esphome:
build_path: ../build/${device_id}
packages:
wifi: !include ../packages/wifi/wifi_dhcp.yaml
logger: !include ../packages/logger/logger.yaml
wifi: !include ./packages/wifi/wifi_dhcp.yaml
logger: !include ./packages/logger/logger.yaml
external_components:
- source:

View File

@ -7,4 +7,4 @@ substitutions:
ap_wifi_pwd: !secret sump-pump-ap-pwd
packages:
feit_dimmer: !include ../packages/topgreener_smart_plug.yaml
feit_dimmer: !include ./packages/topgreener_smart_plug.yaml

View File

@ -7,4 +7,4 @@ substitutions:
ap_wifi_pwd: !secret washing-machine-ap-pwd
packages:
feit_dimmer: !include ../packages/topgreener_smart_plug.yaml
feit_dimmer: !include ./packages/topgreener_smart_plug.yaml