mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 04:35:11 +02:00
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.
This commit is contained in:
committed by
Martin Hjelmare
parent
b282167f26
commit
6215e27de4
@@ -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,
|
||||
|
Reference in New Issue
Block a user