
* 🔥 Removes octopress.js * 🔥 Removes use of root_url var * 🔥 Removes Octopress generator reference from feed * 🔥 Removes delicious support * 🔥 Removes support for Pinboard * 🔥 Removes support for Disqus * 🔥 Removes support for Google Plus * ↩️ Migrate custom after_footer to default template * ↩️ Migrate custom footer to default template * ↩️ Migrate custom header to default template * 🔥 Removes unused template files * 🚀 Places time to read directly in post template * 🚀 Removes unneeded capture from archive_post.html template * 🔥 🚀 Removes unused, but heaving sorting call in component page * 🚀 Merged javascripts into a single file * 🔥 Removes more uses of root_url * 🚀 Removal of unneeded captures from head * 🔥 🚀 Removal of expensive liquid HTML compressor * 🔥 Removes unneeded templates * 🚀 Replaces kramdown with GitHub's CommonMark 🚀 * 💄 Adds Prism code syntax highlighting * ✨ Adds support for redirect in Netlify * ↩️ 🔥 Let Netlify handle all developer doc redirects * ✏️ Fixes typo in redirects file: Netify -> Netlify * 🔥 Removes unused .themes folder * 🔥 Removes unused aside.html template * 🔥 Removes Disqus config leftover * 🔥 Removes rouge highlighter config * 🔥 Removes Octopress 🎉 * 💄 Adjust code block font size and adds soft wraps * 💄 Adds styling for inline code blocks * 💄 Improve styling of note/warning/info boxes + div support * 🔨 Rewrites all note/warning/info boxes
3.3 KiB
title, description, logo, ha_category, ha_release, ha_iot_class
title | description | logo | ha_category | ha_release | ha_iot_class | |||
---|---|---|---|---|---|---|---|---|
MCP23017 I2C GPIO expander | Instructions on how to integrate the MCP23017 GPIO pin expander with I2C interface into Home Assistant. | raspberry-pi.png |
|
0.94 | Local Polling |
The mcp23017
integration is the base for all related mcp23017 platforms in Home Assistant. There is no setup needed for the integration itself, for the platforms please check their corresponding sections.
For more details about the MCP23017 I2C I/O port expander you can find its datasheet here: MCP23017.
Binary Sensor
The mcp23017
binary sensor platform allows you to read sensor values from the I/O pins of your MCP23017 I2C I/O expander.
The pin numbers are from 0 to 15 where: 0-7 correspond to port A (A1-A8) and 8-15 to port B (B1-B8).
Configuration
To use the I/O pins of an mcp23017 connected to an I2C bus of your Raspberry Pi as binary sensors, add the following to your configuration.yaml
file:
# Example configuration.yaml entry
binary_sensor:
- platform: mcp23017
i2c_address: 0x20
pins:
0: PIR Office
1: PIR Bedroom
{% configuration %}
i2c_address:
description: i2c address of MCP23017 chip.
required: false
type: integer
default: "0x20
"
pins:
description: List of used pins.
required: true
type: map
keys:
"pin: name":
description: The pin numbers (from 0 to 15) and corresponding names.
required: true
type: [integer, string]
scan_interval:
description: Interval to scan for sensor state changes in seconds.
required: false
type: integer
default: 15
invert_logic:
description: If true
, inverts the output logic to ACTIVE LOW.
required: false
type: boolean
default: "false
(ACTIVE HIGH)"
pull_mode:
description: >
Type of internal pull resistor to use.
Options are UP
- pull-up resistor and DOWN
- pull-down resistor.
required: false
type: string
default: "UP
"
{% endconfiguration %}
Switch
The mcp23017
switch platform allows you to write to the I/O pins of your MCP23017 I2C I/O expander.
The pin numbers are from 0 to 15 where: 0-7 correspond to port A (A1-A8) and 8-15 to port B (B1-B8).
Configuration
To use the I/O pins of an mcp23017 connected to an I2C bus of your Raspberry Pi as switches, add the following to your configuration.yaml
file:
# Example configuration.yaml entry
switch:
- platform: mcp23017
i2c_address: 0x20
pins:
11: Fan Office
12: Light Desk
{% configuration %}
i2c_address:
description: i2c address of MCP23017 chip.
required: false
type: integer
default: "0x20
"
ports:
description: Array of used pins.
required: true
type: list
keys:
port:
description: The pin numbers (from 0 to 15) and corresponding names.
required: true
type: [integer, string]
invert_logic:
description: If true, inverts the output logic to ACTIVE LOW.
required: false
default: false
type: boolean
{% endconfiguration %}