Add pigpio remote functionality (#31667)
This commit is contained in:
parent
f75bda7551
commit
0ae86b022d
3 changed files with 6 additions and 3 deletions
|
@ -19,7 +19,7 @@ from homeassistant.components.light import (
|
|||
SUPPORT_TRANSITION,
|
||||
Light,
|
||||
)
|
||||
from homeassistant.const import CONF_ADDRESS, CONF_NAME, CONF_TYPE, STATE_ON
|
||||
from homeassistant.const import CONF_ADDRESS, CONF_HOST, CONF_NAME, CONF_TYPE, STATE_ON
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.restore_state import RestoreEntity
|
||||
import homeassistant.util.color as color_util
|
||||
|
@ -58,6 +58,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
|||
vol.Required(CONF_TYPE): vol.In(CONF_LED_TYPES),
|
||||
vol.Optional(CONF_FREQUENCY): cv.positive_int,
|
||||
vol.Optional(CONF_ADDRESS): cv.byte,
|
||||
vol.Optional(CONF_HOST): cv.string,
|
||||
}
|
||||
],
|
||||
)
|
||||
|
@ -76,6 +77,8 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
if CONF_FREQUENCY in led_conf:
|
||||
opt_args["freq"] = led_conf[CONF_FREQUENCY]
|
||||
if driver_type == CONF_DRIVER_GPIO:
|
||||
if CONF_HOST in led_conf:
|
||||
opt_args["host"] = led_conf[CONF_HOST]
|
||||
driver = GpioDriver(pins, **opt_args)
|
||||
elif driver_type == CONF_DRIVER_PCA9685:
|
||||
if CONF_ADDRESS in led_conf:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"domain": "rpi_gpio_pwm",
|
||||
"name": "pigpio Daemon PWM LED",
|
||||
"documentation": "https://www.home-assistant.io/integrations/rpi_gpio_pwm",
|
||||
"requirements": ["pwmled==1.4.1"],
|
||||
"requirements": ["pwmled==1.5.0"],
|
||||
"dependencies": [],
|
||||
"codeowners": []
|
||||
}
|
||||
|
|
|
@ -1072,7 +1072,7 @@ pushetta==1.0.15
|
|||
pushover_complete==1.1.1
|
||||
|
||||
# homeassistant.components.rpi_gpio_pwm
|
||||
pwmled==1.4.1
|
||||
pwmled==1.5.0
|
||||
|
||||
# homeassistant.components.august
|
||||
py-august==0.14.0
|
||||
|
|
Loading…
Add table
Reference in a new issue