binary_sensor: - platform: mcp23017 i2c_address: 0x20 invert_logic: true pins: 0 : Button_1 1 : Button_2 2 : Button_3 3 : Button_4 4 : Button_5 5 : Button_6 6 : Button_7 7 : Button_8 8 : Button_9 9 : Button_10 10 : Button_11 11 : Button_12 12 : Button_13 13 : Button_14 14 : Button_15 15 : Button_16 switch: - platform: mcp23017 i2c_address: 0x22 hw_sync: false invert_logic: true pins: 0 : Output_1 1 : Output_2 2 : Output_3 3 : Output_4 4 : Output_5 5 : Output_6 6 : Output_7 7 : Output_8 8 : Output_9 9 : Output_10 10 : Output_11 11 : Output_12 12 : Output_13 13 : Output_14 14 : Output_15 15 : Output_16