From 0ae86b022d6416e5b061f010944fb5cdd77e6ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20P=C3=B6schl?= Date: Tue, 18 Feb 2020 12:52:55 +0100 Subject: [PATCH] Add pigpio remote functionality (#31667) --- homeassistant/components/rpi_gpio_pwm/light.py | 5 ++++- homeassistant/components/rpi_gpio_pwm/manifest.json | 2 +- requirements_all.txt | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/rpi_gpio_pwm/light.py b/homeassistant/components/rpi_gpio_pwm/light.py index aededbc676c..96ac3c6f2ed 100644 --- a/homeassistant/components/rpi_gpio_pwm/light.py +++ b/homeassistant/components/rpi_gpio_pwm/light.py @@ -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: diff --git a/homeassistant/components/rpi_gpio_pwm/manifest.json b/homeassistant/components/rpi_gpio_pwm/manifest.json index 688cad8324e..46fe96a6426 100644 --- a/homeassistant/components/rpi_gpio_pwm/manifest.json +++ b/homeassistant/components/rpi_gpio_pwm/manifest.json @@ -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": [] } diff --git a/requirements_all.txt b/requirements_all.txt index 04cf63eca76..63861444fbd 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -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