03-23-2022, 12:36 PM
esphome:
name: a32
platform: ESP32
board: esp32dev
# Enable logging
logger:
# Enable Home Assistant API
api:
# Example configuration entry
i2c:
- id: bus_a
sda: 15
scl: 13
scan: true
- id: bus_b
sda: 4
scl: 5
scan: true
# Example configuration entry
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO17_OUT
phy_addr: 0
# Example configuration entry
pcf8574:
- id: 'pcf8574_hub_out_1' # for output channel 1-8
i2c_id: bus_a
address: 0x24
- id: 'pcf8574_hub_out_2' # for output channel 9-16
i2c_id: bus_a
address: 0x25
- id: 'pcf8574_hub_out_3' # for output channel 17-24
i2c_id: bus_a
address: 0x21
- id: 'pcf8574_hub_out_4' # for output channel 25-32
i2c_id: bus_a
address: 0x22
- id: 'pcf8574_hub_in_1' # for input channel 1-8
i2c_id: bus_b
address: 0x24
- id: 'pcf8574_hub_in_2' # for input channel 9-16
i2c_id: bus_b
address: 0x25
- id: 'pcf8574_hub_in_3' # for input channel 17-24
i2c_id: bus_b
address: 0x21
- id: 'pcf8574_hub_in_4' # for input channel 25-32
i2c_id: bus_b
address: 0x22
# Individual outputs
switch:
- platform: gpio
name: "light1"
pin:
pcf8574: pcf8574_hub_out_1
number: 0
mode: OUTPUT
inverted: true
- platform: gpio
name: "light2"
pin:
pcf8574: pcf8574_hub_out_1
number: 1
mode: OUTPUT
inverted: true
- platform: gpio
name: "light3"
pin:
pcf8574: pcf8574_hub_out_1
number: 2
mode: OUTPUT
inverted: true
- platform: gpio
name: "light4"
pin:
pcf8574: pcf8574_hub_out_1
number: 3
mode: OUTPUT
inverted: true
- platform: gpio
name: "light5"
pin:
pcf8574: pcf8574_hub_out_1
number: 4
mode: OUTPUT
inverted: true
- platform: gpio
name: "light6"
pin:
pcf8574: pcf8574_hub_out_1
number: 5
mode: OUTPUT
inverted: true
- platform: gpio
name: "light7"
pin:
pcf8574: pcf8574_hub_out_1
number: 6
mode: OUTPUT
inverted: true
- platform: gpio
name: "light8"
pin:
pcf8574: pcf8574_hub_out_1
number: 7
mode: OUTPUT
inverted: true
- platform: gpio
name: "light9"
pin:
pcf8574: pcf8574_hub_out_2
number: 0
mode: OUTPUT
inverted: true
- platform: gpio
name: "light10"
pin:
pcf8574: pcf8574_hub_out_2
number: 1
mode: OUTPUT
inverted: true
- platform: gpio
name: "light11"
pin:
pcf8574: pcf8574_hub_out_2
number: 2
mode: OUTPUT
inverted: true
- platform: gpio
name: "light12"
pin:
pcf8574: pcf8574_hub_out_2
number: 3
mode: OUTPUT
inverted: true
- platform: gpio
name: "light13"
pin:
pcf8574: pcf8574_hub_out_2
number: 4
mode: OUTPUT
inverted: true
- platform: gpio
name: "light14"
pin:
pcf8574: pcf8574_hub_out_2
number: 5
mode: OUTPUT
inverted: true
- platform: gpio
name: "light15"
pin:
pcf8574: pcf8574_hub_out_2
number: 6
mode: OUTPUT
inverted: true
- platform: gpio
name: "light16"
pin:
pcf8574: pcf8574_hub_out_2
number: 7
mode: OUTPUT
inverted: true
- platform: gpio
name: "light17"
pin:
pcf8574: pcf8574_hub_out_3
number: 0
mode: OUTPUT
inverted: true
- platform: gpio
name: "light18"
pin:
pcf8574: pcf8574_hub_out_3
number: 1
mode: OUTPUT
inverted: true
- platform: gpio
name: "light19"
pin:
pcf8574: pcf8574_hub_out_3
number: 2
mode: OUTPUT
inverted: true
- platform: gpio
name: "light20"
pin:
pcf8574: pcf8574_hub_out_3
number: 3
mode: OUTPUT
inverted: true
- platform: gpio
name: "light21"
pin:
pcf8574: pcf8574_hub_out_3
number: 4
mode: OUTPUT
inverted: true
- platform: gpio
name: "light22"
pin:
pcf8574: pcf8574_hub_out_3
number: 5
mode: OUTPUT
inverted: true
- platform: gpio
name: "light23"
pin:
pcf8574: pcf8574_hub_out_3
number: 6
mode: OUTPUT
inverted: true
- platform: gpio
name: "light24"
pin:
pcf8574: pcf8574_hub_out_3
number: 7
mode: OUTPUT
inverted: true
- platform: gpio
name: "light25"
pin:
pcf8574: pcf8574_hub_out_4
number: 0
mode: OUTPUT
inverted: true
- platform: gpio
name: "light26"
pin:
pcf8574: pcf8574_hub_out_4
number: 1
mode: OUTPUT
inverted: true
- platform: gpio
name: "light27"
pin:
pcf8574: pcf8574_hub_out_4
number: 2
mode: OUTPUT
inverted: true
- platform: gpio
name: "light28"
pin:
pcf8574: pcf8574_hub_out_4
number: 3
mode: OUTPUT
inverted: true
- platform: gpio
name: "light29"
pin:
pcf8574: pcf8574_hub_out_4
number: 4
mode: OUTPUT
inverted: true
- platform: gpio
name: "light30"
pin:
pcf8574: pcf8574_hub_out_4
number: 5
mode: OUTPUT
inverted: true
- platform: gpio
name: "light31"
pin:
pcf8574: pcf8574_hub_out_4
number: 6
mode: OUTPUT
inverted: true
- platform: gpio
name: "light32"
pin:
pcf8574: pcf8574_hub_out_4
number: 7
mode: OUTPUT
inverted: true
# Individual outputs
binary_sensor:
- platform: gpio
name: "input1"
pin:
pcf8574: pcf8574_hub_in_1
number: 0
mode: INPUT
inverted: true
- platform: gpio
name: "input2"
pin:
pcf8574: pcf8574_hub_in_1
number: 1
mode: INPUT
inverted: true
- platform: gpio
name: "input3"
pin:
pcf8574: pcf8574_hub_in_1
number: 2
mode: INPUT
inverted: true
- platform: gpio
name: "input4"
pin:
pcf8574: pcf8574_hub_in_1
number: 3
mode: INPUT
inverted: true
- platform: gpio
name: "input5"
pin:
pcf8574: pcf8574_hub_in_1
number: 4
mode: INPUT
inverted: true
- platform: gpio
name: "input6"
pin:
pcf8574: pcf8574_hub_in_1
number: 5
mode: INPUT
inverted: true
- platform: gpio
name: "input7"
pin:
pcf8574: pcf8574_hub_in_1
number: 6
mode: INPUT
inverted: true
- platform: gpio
name: "input8"
pin:
pcf8574: pcf8574_hub_in_1
number: 7
mode: INPUT
inverted: true
- platform: gpio
name: "input9"
pin:
pcf8574: pcf8574_hub_in_2
number: 0
mode: INPUT
inverted: true
- platform: gpio
name: "input10"
pin:
pcf8574: pcf8574_hub_in_2
number: 1
mode: INPUT
inverted: true
- platform: gpio
name: "input11"
pin:
pcf8574: pcf8574_hub_in_2
number: 2
mode: INPUT
inverted: true
- platform: gpio
name: "input12"
pin:
pcf8574: pcf8574_hub_in_2
number: 3
mode: INPUT
inverted: true
- platform: gpio
name: "input13"
pin:
pcf8574: pcf8574_hub_in_2
number: 4
mode: INPUT
inverted: true
- platform: gpio
name: "input14"
pin:
pcf8574: pcf8574_hub_in_2
number: 5
mode: INPUT
inverted: true
- platform: gpio
name: "input15"
pin:
pcf8574: pcf8574_hub_in_2
number: 6
mode: INPUT
inverted: true
- platform: gpio
name: "input16"
pin:
pcf8574: pcf8574_hub_in_2
number: 7
mode: INPUT
inverted: true
- platform: gpio
name: "input17"
pin:
pcf8574: pcf8574_hub_in_3
number: 0
mode: INPUT
inverted: true
- platform: gpio
name: "input18"
pin:
pcf8574: pcf8574_hub_in_3
number: 1
mode: INPUT
inverted: true
- platform: gpio
name: "input19"
pin:
pcf8574: pcf8574_hub_in_3
number: 2
mode: INPUT
inverted: true
- platform: gpio
name: "input20"
pin:
pcf8574: pcf8574_hub_in_3
number: 3
mode: INPUT
inverted: true
- platform: gpio
name: "input21"
pin:
pcf8574: pcf8574_hub_in_3
number: 4
mode: INPUT
inverted: true
- platform: gpio
name: "input22"
pin:
pcf8574: pcf8574_hub_in_3
number: 5
mode: INPUT
inverted: true
- platform: gpio
name: "input23"
pin:
pcf8574: pcf8574_hub_in_3
number: 6
mode: INPUT
inverted: true
- platform: gpio
name: "input24"
pin:
pcf8574: pcf8574_hub_in_3
number: 7
mode: INPUT
inverted: true
- platform: gpio
name: "input25"
pin:
pcf8574: pcf8574_hub_in_4
number: 0
mode: INPUT
inverted: true
- platform: gpio
name: "input26"
pin:
pcf8574: pcf8574_hub_in_4
number: 1
mode: INPUT
inverted: true
- platform: gpio
name: "input27"
pin:
pcf8574: pcf8574_hub_in_4
number: 2
mode: INPUT
inverted: true
- platform: gpio
name: "input28"
pin:
pcf8574: pcf8574_hub_in_4
number: 3
mode: INPUT
inverted: true
- platform: gpio
name: "input29"
pin:
pcf8574: pcf8574_hub_in_4
number: 4
mode: INPUT
inverted: true
- platform: gpio
name: "input30"
pin:
pcf8574: pcf8574_hub_in_4
number: 5
mode: INPUT
inverted: true
- platform: gpio
name: "input31"
pin:
pcf8574: pcf8574_hub_in_4
number: 6
mode: INPUT
inverted: true
- platform: gpio
name: "input32"
pin:
pcf8574: pcf8574_hub_in_4
number: 7
mode: INPUT
inverted: true
# Example configuration entry
sensor:
- platform: adc
pin: 39
name: "analog-1"
update_interval: 10s
attenuation: 11db
- platform: adc
pin: 34
name: "analog-2"
update_interval: 10s
attenuation: 11db
- platform: adc
pin: 36
name: "analog-3"
update_interval: 10s
attenuation: 11db
- platform: adc
pin: 35
name: "analog-4"
update_interval: 10s
attenuation: 11db
name: a32
platform: ESP32
board: esp32dev
# Enable logging
logger:
# Enable Home Assistant API
api:
# Example configuration entry
i2c:
- id: bus_a
sda: 15
scl: 13
scan: true
- id: bus_b
sda: 4
scl: 5
scan: true
# Example configuration entry
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO17_OUT
phy_addr: 0
# Example configuration entry
pcf8574:
- id: 'pcf8574_hub_out_1' # for output channel 1-8
i2c_id: bus_a
address: 0x24
- id: 'pcf8574_hub_out_2' # for output channel 9-16
i2c_id: bus_a
address: 0x25
- id: 'pcf8574_hub_out_3' # for output channel 17-24
i2c_id: bus_a
address: 0x21
- id: 'pcf8574_hub_out_4' # for output channel 25-32
i2c_id: bus_a
address: 0x22
- id: 'pcf8574_hub_in_1' # for input channel 1-8
i2c_id: bus_b
address: 0x24
- id: 'pcf8574_hub_in_2' # for input channel 9-16
i2c_id: bus_b
address: 0x25
- id: 'pcf8574_hub_in_3' # for input channel 17-24
i2c_id: bus_b
address: 0x21
- id: 'pcf8574_hub_in_4' # for input channel 25-32
i2c_id: bus_b
address: 0x22
# Individual outputs
switch:
- platform: gpio
name: "light1"
pin:
pcf8574: pcf8574_hub_out_1
number: 0
mode: OUTPUT
inverted: true
- platform: gpio
name: "light2"
pin:
pcf8574: pcf8574_hub_out_1
number: 1
mode: OUTPUT
inverted: true
- platform: gpio
name: "light3"
pin:
pcf8574: pcf8574_hub_out_1
number: 2
mode: OUTPUT
inverted: true
- platform: gpio
name: "light4"
pin:
pcf8574: pcf8574_hub_out_1
number: 3
mode: OUTPUT
inverted: true
- platform: gpio
name: "light5"
pin:
pcf8574: pcf8574_hub_out_1
number: 4
mode: OUTPUT
inverted: true
- platform: gpio
name: "light6"
pin:
pcf8574: pcf8574_hub_out_1
number: 5
mode: OUTPUT
inverted: true
- platform: gpio
name: "light7"
pin:
pcf8574: pcf8574_hub_out_1
number: 6
mode: OUTPUT
inverted: true
- platform: gpio
name: "light8"
pin:
pcf8574: pcf8574_hub_out_1
number: 7
mode: OUTPUT
inverted: true
- platform: gpio
name: "light9"
pin:
pcf8574: pcf8574_hub_out_2
number: 0
mode: OUTPUT
inverted: true
- platform: gpio
name: "light10"
pin:
pcf8574: pcf8574_hub_out_2
number: 1
mode: OUTPUT
inverted: true
- platform: gpio
name: "light11"
pin:
pcf8574: pcf8574_hub_out_2
number: 2
mode: OUTPUT
inverted: true
- platform: gpio
name: "light12"
pin:
pcf8574: pcf8574_hub_out_2
number: 3
mode: OUTPUT
inverted: true
- platform: gpio
name: "light13"
pin:
pcf8574: pcf8574_hub_out_2
number: 4
mode: OUTPUT
inverted: true
- platform: gpio
name: "light14"
pin:
pcf8574: pcf8574_hub_out_2
number: 5
mode: OUTPUT
inverted: true
- platform: gpio
name: "light15"
pin:
pcf8574: pcf8574_hub_out_2
number: 6
mode: OUTPUT
inverted: true
- platform: gpio
name: "light16"
pin:
pcf8574: pcf8574_hub_out_2
number: 7
mode: OUTPUT
inverted: true
- platform: gpio
name: "light17"
pin:
pcf8574: pcf8574_hub_out_3
number: 0
mode: OUTPUT
inverted: true
- platform: gpio
name: "light18"
pin:
pcf8574: pcf8574_hub_out_3
number: 1
mode: OUTPUT
inverted: true
- platform: gpio
name: "light19"
pin:
pcf8574: pcf8574_hub_out_3
number: 2
mode: OUTPUT
inverted: true
- platform: gpio
name: "light20"
pin:
pcf8574: pcf8574_hub_out_3
number: 3
mode: OUTPUT
inverted: true
- platform: gpio
name: "light21"
pin:
pcf8574: pcf8574_hub_out_3
number: 4
mode: OUTPUT
inverted: true
- platform: gpio
name: "light22"
pin:
pcf8574: pcf8574_hub_out_3
number: 5
mode: OUTPUT
inverted: true
- platform: gpio
name: "light23"
pin:
pcf8574: pcf8574_hub_out_3
number: 6
mode: OUTPUT
inverted: true
- platform: gpio
name: "light24"
pin:
pcf8574: pcf8574_hub_out_3
number: 7
mode: OUTPUT
inverted: true
- platform: gpio
name: "light25"
pin:
pcf8574: pcf8574_hub_out_4
number: 0
mode: OUTPUT
inverted: true
- platform: gpio
name: "light26"
pin:
pcf8574: pcf8574_hub_out_4
number: 1
mode: OUTPUT
inverted: true
- platform: gpio
name: "light27"
pin:
pcf8574: pcf8574_hub_out_4
number: 2
mode: OUTPUT
inverted: true
- platform: gpio
name: "light28"
pin:
pcf8574: pcf8574_hub_out_4
number: 3
mode: OUTPUT
inverted: true
- platform: gpio
name: "light29"
pin:
pcf8574: pcf8574_hub_out_4
number: 4
mode: OUTPUT
inverted: true
- platform: gpio
name: "light30"
pin:
pcf8574: pcf8574_hub_out_4
number: 5
mode: OUTPUT
inverted: true
- platform: gpio
name: "light31"
pin:
pcf8574: pcf8574_hub_out_4
number: 6
mode: OUTPUT
inverted: true
- platform: gpio
name: "light32"
pin:
pcf8574: pcf8574_hub_out_4
number: 7
mode: OUTPUT
inverted: true
# Individual outputs
binary_sensor:
- platform: gpio
name: "input1"
pin:
pcf8574: pcf8574_hub_in_1
number: 0
mode: INPUT
inverted: true
- platform: gpio
name: "input2"
pin:
pcf8574: pcf8574_hub_in_1
number: 1
mode: INPUT
inverted: true
- platform: gpio
name: "input3"
pin:
pcf8574: pcf8574_hub_in_1
number: 2
mode: INPUT
inverted: true
- platform: gpio
name: "input4"
pin:
pcf8574: pcf8574_hub_in_1
number: 3
mode: INPUT
inverted: true
- platform: gpio
name: "input5"
pin:
pcf8574: pcf8574_hub_in_1
number: 4
mode: INPUT
inverted: true
- platform: gpio
name: "input6"
pin:
pcf8574: pcf8574_hub_in_1
number: 5
mode: INPUT
inverted: true
- platform: gpio
name: "input7"
pin:
pcf8574: pcf8574_hub_in_1
number: 6
mode: INPUT
inverted: true
- platform: gpio
name: "input8"
pin:
pcf8574: pcf8574_hub_in_1
number: 7
mode: INPUT
inverted: true
- platform: gpio
name: "input9"
pin:
pcf8574: pcf8574_hub_in_2
number: 0
mode: INPUT
inverted: true
- platform: gpio
name: "input10"
pin:
pcf8574: pcf8574_hub_in_2
number: 1
mode: INPUT
inverted: true
- platform: gpio
name: "input11"
pin:
pcf8574: pcf8574_hub_in_2
number: 2
mode: INPUT
inverted: true
- platform: gpio
name: "input12"
pin:
pcf8574: pcf8574_hub_in_2
number: 3
mode: INPUT
inverted: true
- platform: gpio
name: "input13"
pin:
pcf8574: pcf8574_hub_in_2
number: 4
mode: INPUT
inverted: true
- platform: gpio
name: "input14"
pin:
pcf8574: pcf8574_hub_in_2
number: 5
mode: INPUT
inverted: true
- platform: gpio
name: "input15"
pin:
pcf8574: pcf8574_hub_in_2
number: 6
mode: INPUT
inverted: true
- platform: gpio
name: "input16"
pin:
pcf8574: pcf8574_hub_in_2
number: 7
mode: INPUT
inverted: true
- platform: gpio
name: "input17"
pin:
pcf8574: pcf8574_hub_in_3
number: 0
mode: INPUT
inverted: true
- platform: gpio
name: "input18"
pin:
pcf8574: pcf8574_hub_in_3
number: 1
mode: INPUT
inverted: true
- platform: gpio
name: "input19"
pin:
pcf8574: pcf8574_hub_in_3
number: 2
mode: INPUT
inverted: true
- platform: gpio
name: "input20"
pin:
pcf8574: pcf8574_hub_in_3
number: 3
mode: INPUT
inverted: true
- platform: gpio
name: "input21"
pin:
pcf8574: pcf8574_hub_in_3
number: 4
mode: INPUT
inverted: true
- platform: gpio
name: "input22"
pin:
pcf8574: pcf8574_hub_in_3
number: 5
mode: INPUT
inverted: true
- platform: gpio
name: "input23"
pin:
pcf8574: pcf8574_hub_in_3
number: 6
mode: INPUT
inverted: true
- platform: gpio
name: "input24"
pin:
pcf8574: pcf8574_hub_in_3
number: 7
mode: INPUT
inverted: true
- platform: gpio
name: "input25"
pin:
pcf8574: pcf8574_hub_in_4
number: 0
mode: INPUT
inverted: true
- platform: gpio
name: "input26"
pin:
pcf8574: pcf8574_hub_in_4
number: 1
mode: INPUT
inverted: true
- platform: gpio
name: "input27"
pin:
pcf8574: pcf8574_hub_in_4
number: 2
mode: INPUT
inverted: true
- platform: gpio
name: "input28"
pin:
pcf8574: pcf8574_hub_in_4
number: 3
mode: INPUT
inverted: true
- platform: gpio
name: "input29"
pin:
pcf8574: pcf8574_hub_in_4
number: 4
mode: INPUT
inverted: true
- platform: gpio
name: "input30"
pin:
pcf8574: pcf8574_hub_in_4
number: 5
mode: INPUT
inverted: true
- platform: gpio
name: "input31"
pin:
pcf8574: pcf8574_hub_in_4
number: 6
mode: INPUT
inverted: true
- platform: gpio
name: "input32"
pin:
pcf8574: pcf8574_hub_in_4
number: 7
mode: INPUT
inverted: true
# Example configuration entry
sensor:
- platform: adc
pin: 39
name: "analog-1"
update_interval: 10s
attenuation: 11db
- platform: adc
pin: 34
name: "analog-2"
update_interval: 10s
attenuation: 11db
- platform: adc
pin: 36
name: "analog-3"
update_interval: 10s
attenuation: 11db
- platform: adc
pin: 35
name: "analog-4"
update_interval: 10s
attenuation: 11db