mirror of
https://github.com/esphome/esphome.git
synced 2026-05-21 17:39:00 +08:00
30 lines
543 B
YAML
30 lines
543 B
YAML
mcp23008:
|
|
- i2c_id: i2c_bus
|
|
id: mcp23008_hub
|
|
- i2c_id: i2c_bus
|
|
id: mcp23008_hub_int
|
|
address: 0x21
|
|
interrupt_pin: ${interrupt_pin}
|
|
|
|
binary_sensor:
|
|
- platform: gpio
|
|
id: mcp23008_binary_sensor
|
|
pin:
|
|
mcp23xxx: mcp23008_hub
|
|
number: 0
|
|
mode: INPUT
|
|
- platform: gpio
|
|
id: mcp23008_binary_sensor_int
|
|
pin:
|
|
mcp23xxx: mcp23008_hub_int
|
|
number: 0
|
|
mode: INPUT
|
|
|
|
switch:
|
|
- platform: gpio
|
|
id: mcp23008_switch
|
|
pin:
|
|
mcp23xxx: mcp23008_hub
|
|
number: 1
|
|
mode: OUTPUT
|