diff --git a/custom_components/hilo/sensor.py b/custom_components/hilo/sensor.py index f1c0e3b..5c3fa0a 100755 --- a/custom_components/hilo/sensor.py +++ b/custom_components/hilo/sensor.py @@ -173,7 +173,9 @@ def create_energy_entity(device): for tarif, amount in tariff_config.items(): if amount > 0: sensor_name = f"Hilo rate {tarif}" - cost_entities.append(HiloCostSensor(hilo, sensor_name, hq_plan_name, amount)) + cost_entities.append( + HiloCostSensor(hilo, sensor_name, hq_plan_name, amount) + ) cost_entities.append(HiloCostSensor(hilo, "Hilo rate current", hq_plan_name)) async_add_entities(cost_entities) # This setups the utility_meter platform @@ -704,7 +706,9 @@ async def async_added_to_hass(self): if last_state: self._last_update = dt_util.utcnow() self._amount = last_state.state - LOG.info(f"Restoring energy cost sensor {last_state.name} {self.plan_name} Amount: {self._amount}") + LOG.info( + f"Restoring energy cost sensor {last_state.name} {self.plan_name} Amount: {self._amount}" + ) async def async_update(self): return