Adhere to scan_interval in platforms when setup via config entry (#14969)

This commit is contained in:
Paulus Schoutsen authored and Pascal Vizeli committed 2018-06-15 16:59:13 +02:00
1 parent d6d685a483
commit 1128104281
3 files changed
+11 -3

No files matched your search

+2 -1
View File
@@ -108,7 +108,8 @@ class EntityComponent(object):
raise ValueError('Config entry has already been setup!')
self._platforms[key] = self._async_init_entity_platform(
platform_type, platform
platform_type, platform,
scan_interval=getattr(platform, 'SCAN_INTERVAL', None),
)
return await self._platforms[key].async_setup_entry(config_entry)