My ESPHome Workshop

GitHub

CAP1166

binary-sensor cap1166

Capacitive touch controller for 6-channel touch inputs with LED control

📅Last updated:December 7, 2025(7 days ago)

Overview

The CAP1166 is a capacitive touch controller that provides 6 independent touch sensing channels with integrated LED drivers, commonly used in touch button interfaces like the Pimoroni Touch pHAT.

External Component

I created external component based on cap1188

The external component is here: cap1166 and tca9554

It allows for independently controlling all 6 touch buttons and 6 LEDs.

To use it:

external_components:
  - source: github://barbarachbc/esphomecomponents
    components: [ cap1166 ]
    refresh: 5min
        
cap1166:
  - id: touch_phat
    address: 0x2C
    touch_threshold: 0x40
    allow_multiple_touches: true

binary_sensor:
  - platform: cap1166
    id: touch_key0
    channel: 0
    name: "Touch Key 0"
    on_press:
      then:
        - logger.log: "Key 0 pressed"
    on_release:
      then:
        - logger.log: "Key 0 released"

light:
  #NOTE: touch phat has them connected inversly
  - id: my_light_forward
    platform: cap1166
    channel: 0
    led_behavior: PULSE2
← Back to all components