mirror of
https://github.com/home-assistant/core.git
synced 2025-11-17 15:00:12 +00:00
Do not call update() in constructor (#7912)
* Do not call update() in constructor * Do not call update() in constructor * Remove unused import
This commit is contained in:
@@ -36,7 +36,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
"""Set up the Twitch platform."""
|
||||
channels = config.get(CONF_CHANNELS, [])
|
||||
|
||||
add_devices([TwitchSensor(channel) for channel in channels])
|
||||
add_devices([TwitchSensor(channel) for channel in channels], True)
|
||||
|
||||
|
||||
class TwitchSensor(Entity):
|
||||
@@ -49,7 +49,6 @@ class TwitchSensor(Entity):
|
||||
self._preview = None
|
||||
self._game = None
|
||||
self._title = None
|
||||
self.update()
|
||||
|
||||
@property
|
||||
def should_poll(self):
|
||||
|
||||
Reference in New Issue
Block a user