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
parent
b282167f26
commit
6215e27de4
|
@ -80,6 +80,8 @@ class Geizwatch(Entity):
|
||||||
@property
|
@property
|
||||||
def device_state_attributes(self):
|
def device_state_attributes(self):
|
||||||
"""Return the state attributes."""
|
"""Return the state attributes."""
|
||||||
|
while len(self.data.prices) < 4:
|
||||||
|
self.data.prices.append("None")
|
||||||
attrs = {'device_name': self.data.device_name,
|
attrs = {'device_name': self.data.device_name,
|
||||||
'description': self.description,
|
'description': self.description,
|
||||||
'unit_of_measurement': self.data.unit_of_measurement,
|
'unit_of_measurement': self.data.unit_of_measurement,
|
||||||
|
|
Loading…
Reference in New Issue