mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Fix geizhals crash if no price found (#19197)
* Fix geizhals crash if no price found * Return None on unknown price. * Linting * Linting the linting
This commit is contained in:
parent
7de509dc76
commit
4984030871
@ -80,6 +80,9 @@ class Geizwatch(Entity):
|
||||
@property
|
||||
def state(self):
|
||||
"""Return the best price of the selected product."""
|
||||
if not self._device.prices:
|
||||
return None
|
||||
|
||||
return self._device.prices[0]
|
||||
|
||||
@property
|
||||
|
Loading…
x
Reference in New Issue
Block a user