Edit config file
Everything what you should know about configuration file
The Configuration File
The configuration file for the ESP Cover Mix might seem large, but it's a logical combination of the ESP Cover and ESP 32x10A modules. This guide will walk you through each section.
As an example, we will use a standard boneio-cover-mix.yaml configuration.
Full Configuration Example
substitutions:
name: boneio-cm-07
friendly_name: 'BoneIO ESP Cover Mix'
esphome:
name: '${name}'
friendly_name: '${friendly_name}'
name_add_mac_suffix: true
project:
name: boneio.cover-mix
version: '0.7'
# ... (Standard sections like esp32, ethernet, logger, api, ota, etc.)
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1 # Or latest version
files:
# Common device files
- 'devices/buzzer.yaml'
- 'devices/serial_no.yaml'
# ... other common files
# Cover outputs (Top Part - 8 covers = 16 relays)
- 'boards/cover/out01_02.yaml'
- 'boards/cover/out03_04.yaml'
- 'boards/cover/out05_06.yaml'
- 'boards/cover/out07_08.yaml'
- 'boards/cover/out09_10.yaml'
- 'boards/cover/out11_12.yaml'
- 'boards/cover/out13_14.yaml'
- 'boards/cover/out15_16.yaml'
# Relay outputs (Bottom Part - 16 relays)
- 'boards/output/out17_18.yaml'
- 'boards/output/out19_20.yaml'
- 'boards/output/out21_22.yaml'
- 'boards/output/out23_24.yaml'
- 'boards/output/out25_26.yaml'
- 'boards/output/out27_28.yaml'
- 'boards/output/out29_30.yaml'
- 'boards/output/out31_32.yaml'
# Cover section for shutters/blinds
cover:
- platform: time_based
name: 'Cover 01'
id: cover_01
open_action:
- switch.turn_on: cover_open_01_out01
open_duration: 10s
close_action:
- switch.turn_on: cover_close_01_out02
close_duration: 10s
stop_action:
- switch.turn_off: cover_open_01_out01
- switch.turn_off: cover_close_01_out02
# ... (configurations for Cover 02 to Cover 08)
# Light section for relays
light:
- platform: binary
name: 'Light 17'
output: out_17
id: light_17
# ... (configurations for Light 18 to Light 32)
# Binary sensor section for inputs
binary_sensor:
- platform: gpio
name: 'IN_01'
id: in_01
pin:
pcf8574: pcf_inputs_1to14
number: 0
on_press:
then:
- cover.open: cover_01
on_release:
then:
- cover.stop: cover_01
- platform: gpio
name: 'IN_17'
id: in_17
pin:
pcf8574: pcf_inputs_15to32 # Assuming a different PCF for these inputs
number: 2
on_press:
then:
- light.toggle: light_17Section Explanations
substitutions & esphome
These sections are for naming your controller. Set a friendly_name that makes sense for your setup, like "boneIO Cover Mix 1st Floor". The other parameters are for internal identification and project versioning.
packages
This is a key section. It loads the hardware definitions from our GitHub repository. For the Cover Mix, it loads two sets of files:
boards/cover/: These define the first 16 relays as 8 pairs for controlling covers.boards/output/: These define relays 17 through 32 as individual outputs for lights, switches, etc.
cover Section
This section is for configuring your roller shutters and venetian blinds (outputs 1-16).
platform: time_based: Use this for standard roller shutters.name: Set a friendly name for Home Assistant.open_duration/close_duration: Crucial for calibration! You must measure the time it takes for your shutter to fully open and close.
For venetian blinds with tilt control, you can use the venetian_blinds custom platform. This requires adding an external_components block at the top of your file and calibrating the tilt_duration. For a detailed guide, see the Naming Outputs page.
light / switch Section
This section is for configuring your general-purpose relays (outputs 17-32).
platform: binary: Creates a simple on/off light entity.platform: output: Creates a simple on/off switch entity.name: Set a friendly name, e.g., 'Garden Light' or 'Garage Power'.output: Links the entity to a physical relay, e.g.,out_17.
binary_sensor Section
This defines your physical inputs (wall switches). You can link any input to any cover or light action. For example, IN_01 can control cover_01, while IN_17 can toggle light_17.