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
This commit is contained in:
Sören Oldag 2020-11-06 10:58:37 +01:00 committed by GitHub
parent 2d428210e4
commit 4e614e0f2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 5 deletions

View file

@ -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):