esphome / esphome/feature-requests

SX1509 Allow setting PWM frequency and debounce

Open
#1,899 2 comments 5 reactions 0 assignees View on GitHub
component: sx1509
Dominant language
No language data
Stars
450
Forks
29
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem you have/What new integration you would like**

- The SX1509 allows setting the global PWM rate for all output pins, I'd like this to be a configurable value in ESPhome instead of a static value.
- The SX1509 allows setting the global debounce value. ESPhome has implemented this but only under the "keypad" functionality, not as a general binary sensor.

**Please describe your use case for this integration and alternatives you've tried:**

- Allowing the PWM frequency to be set will make the expander more useful in LED applications. Sometimes a 2MHz PWM rate is not desirable. The SX1509 allows you to set this frequency to various levels but the configuration value is missing from within ESPhome.
- Allowing the debounce rate to be set as a global value means it can be changed without having a keypad configured since it also applies to binary inputs, etc.. It should be a global value instead of keypad only.

**Additional context**

Part of this request is [linked to a prior request](https://github.com/esphome/feature-requests/issues/1361) in making the SX1509 integration within ESPhome more useful to be used in hardware projects. The SX1509 is quite a capable chip but currently it's functionality can't be fully utilized within ESPhome.

The [Sparkfun Arduino Library](https://github.com/sparkfun/SparkFun_SX1509_Arduino_Library/tree/master/src) describes very well what options are possible with the chip.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the linked prior request and the SparkFun SX1509 Arduino Library options referenced in the issue. Identify the existing SX1509 keypad and output configuration paths, then verify that PWM frequency is configurable and debounce can apply globally to binary inputs without requiring keypad functionality.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.