mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
Remove useless assignment (#31272)
This commit is contained in:
parent
a1e1610a69
commit
fa15bead94
@ -229,19 +229,6 @@ class CoverTemplate(CoverDevice):
|
|||||||
self._entities = entity_ids
|
self._entities = entity_ids
|
||||||
self._available = True
|
self._available = True
|
||||||
|
|
||||||
if self._template is not None:
|
|
||||||
self._template.hass = self.hass
|
|
||||||
if self._position_template is not None:
|
|
||||||
self._position_template.hass = self.hass
|
|
||||||
if self._tilt_template is not None:
|
|
||||||
self._tilt_template.hass = self.hass
|
|
||||||
if self._icon_template is not None:
|
|
||||||
self._icon_template.hass = self.hass
|
|
||||||
if self._entity_picture_template is not None:
|
|
||||||
self._entity_picture_template.hass = self.hass
|
|
||||||
if self._availability_template is not None:
|
|
||||||
self._availability_template.hass = self.hass
|
|
||||||
|
|
||||||
async def async_added_to_hass(self):
|
async def async_added_to_hass(self):
|
||||||
"""Register callbacks."""
|
"""Register callbacks."""
|
||||||
|
|
||||||
|
@ -189,18 +189,12 @@ class TemplateFan(FanEntity):
|
|||||||
self._oscillating = None
|
self._oscillating = None
|
||||||
self._direction = None
|
self._direction = None
|
||||||
|
|
||||||
self._template.hass = self.hass
|
|
||||||
if self._speed_template:
|
if self._speed_template:
|
||||||
self._speed_template.hass = self.hass
|
|
||||||
self._supported_features |= SUPPORT_SET_SPEED
|
self._supported_features |= SUPPORT_SET_SPEED
|
||||||
if self._oscillating_template:
|
if self._oscillating_template:
|
||||||
self._oscillating_template.hass = self.hass
|
|
||||||
self._supported_features |= SUPPORT_OSCILLATE
|
self._supported_features |= SUPPORT_OSCILLATE
|
||||||
if self._direction_template:
|
if self._direction_template:
|
||||||
self._direction_template.hass = self.hass
|
|
||||||
self._supported_features |= SUPPORT_DIRECTION
|
self._supported_features |= SUPPORT_DIRECTION
|
||||||
if self._availability_template:
|
|
||||||
self._availability_template.hass = self.hass
|
|
||||||
|
|
||||||
self._entities = entity_ids
|
self._entities = entity_ids
|
||||||
# List of valid speeds
|
# List of valid speeds
|
||||||
|
@ -174,19 +174,6 @@ class LightTemplate(Light):
|
|||||||
self._entities = entity_ids
|
self._entities = entity_ids
|
||||||
self._available = True
|
self._available = True
|
||||||
|
|
||||||
if self._template is not None:
|
|
||||||
self._template.hass = self.hass
|
|
||||||
if self._level_template is not None:
|
|
||||||
self._level_template.hass = self.hass
|
|
||||||
if self._icon_template is not None:
|
|
||||||
self._icon_template.hass = self.hass
|
|
||||||
if self._entity_picture_template is not None:
|
|
||||||
self._entity_picture_template.hass = self.hass
|
|
||||||
if self._availability_template is not None:
|
|
||||||
self._availability_template.hass = self.hass
|
|
||||||
if self._temperature_template is not None:
|
|
||||||
self._temperature_template.hass = self.hass
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def brightness(self):
|
def brightness(self):
|
||||||
"""Return the brightness of the light."""
|
"""Return the brightness of the light."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user