Skip to content

Commit e118841

Browse files
bug fix (#27)
1 parent 288d9d7 commit e118841

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

custom_components/tibber_data/sensor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ def _handle_coordinator_update(self) -> None:
101101
grid_price = self.coordinator.data.get("grid_price", {}).get(
102102
dt_util.now().replace(minute=0, second=0, microsecond=0)
103103
)
104+
if grid_price is None:
105+
return
104106
price = self.coordinator.get_price_at(dt_util.now())
105107
native_value = (
106108
grid_price + price - self.coordinator.data["est_subsidy"]

0 commit comments

Comments
 (0)