Fixes #9379 - Added additional string check in Wunderground sensor (#9380)

* Added additional string check

* optimaze
pull/9385/head
Alok Saboo 2017-09-12 02:27:40 +05:30 committed by Pascal Vizeli
parent 31f189da82
commit 6d01838632
1 changed files with 1 additions and 1 deletions

View File

@ -708,7 +708,7 @@ class WUndergroundSensor(Entity):
def entity_picture(self):
"""Return the entity picture."""
url = self._cfg_expand("entity_picture")
if url is not None:
if isinstance(url, str):
return re.sub(r'^http://', 'https://', url, flags=re.IGNORECASE)
@property