From 4e614e0f2cef0b5699b1f25c8ac1e028e9dac75a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Oldag?= Date: Fri, 6 Nov 2020 10:58:37 +0100 Subject: [PATCH] Remove unneeded state restoration of the physical device in rpi_gpio_pwm integration (#42804) * Add @soldag to code owners of rpi_gpio_pwm platform * Remove unneeded state restoration of the physical device in rpi_gpio_pwm integration --- CODEOWNERS | 1 + homeassistant/components/rpi_gpio_pwm/light.py | 4 ---- homeassistant/components/rpi_gpio_pwm/manifest.json | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 828bedb01b9..a3ce257eafc 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -368,6 +368,7 @@ homeassistant/components/rmvtransport/* @cgtobi homeassistant/components/roku/* @ctalkington homeassistant/components/roomba/* @pschmitt @cyr-ius @shenxn homeassistant/components/roon/* @pavoni +homeassistant/components/rpi_gpio_pwm/* @soldag homeassistant/components/rpi_power/* @shenxn @swetoast homeassistant/components/ruckus_unleashed/* @gabe565 homeassistant/components/safe_mode/* @home-assistant/core diff --git a/homeassistant/components/rpi_gpio_pwm/light.py b/homeassistant/components/rpi_gpio_pwm/light.py index f86d1f27832..0673047c6a7 100644 --- a/homeassistant/components/rpi_gpio_pwm/light.py +++ b/homeassistant/components/rpi_gpio_pwm/light.py @@ -123,9 +123,6 @@ class PwmSimpleLed(LightEntity, RestoreEntity): self._brightness = last_state.attributes.get( "brightness", DEFAULT_BRIGHTNESS ) - self._led.set( - is_on=self._is_on, brightness=_from_hass_brightness(self._brightness) - ) @property def should_poll(self): @@ -199,7 +196,6 @@ class PwmRgbLed(PwmSimpleLed): last_state = await self.async_get_last_state() if last_state: self._color = last_state.attributes.get("hs_color", DEFAULT_COLOR) - self._led.set(color=_from_hass_color(self._color)) @property def hs_color(self): diff --git a/homeassistant/components/rpi_gpio_pwm/manifest.json b/homeassistant/components/rpi_gpio_pwm/manifest.json index 2467673e950..9b926bafa1d 100644 --- a/homeassistant/components/rpi_gpio_pwm/manifest.json +++ b/homeassistant/components/rpi_gpio_pwm/manifest.json @@ -3,5 +3,5 @@ "name": "pigpio Daemon PWM LED", "documentation": "https://www.home-assistant.io/integrations/rpi_gpio_pwm", "requirements": ["pwmled==1.6.6"], - "codeowners": [] + "codeowners": ["@soldag"] }