Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
maxyvon authored Oct 29, 2023
1 parent e74773b commit b69b702
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions custom_components/hilo/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit b69b702

Please sign in to comment.