Fix Geizhals index issue when not 4 prices available (#9035)

* Out of index issue, when not 4 prices are available

* Removed the parenthesis, to fix the lint error.
pull/9040/head
celeroll 2017-08-18 19:59:20 +02:00 committed by Martin Hjelmare
parent b282167f26
commit 6215e27de4
1 changed files with 2 additions and 0 deletions

View File

@ -80,6 +80,8 @@ class Geizwatch(Entity):
@property
def device_state_attributes(self):
"""Return the state attributes."""
while len(self.data.prices) < 4:
self.data.prices.append("None")
attrs = {'device_name': self.data.device_name,
'description': self.description,
'unit_of_measurement': self.data.unit_of_measurement,