Skip to content

Commit

Permalink
feat(sensor): Removed registering of current consumption sensors
Browse files Browse the repository at this point in the history
  • Loading branch information
BottlecapDave committed Dec 5, 2021
1 parent 0470ff3 commit d263a68
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions custom_components/octopus_energy/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,13 @@ async def async_setup_default_sensors(hass, entry, async_add_entities):
# We only care about points that have active agreements
if async_get_active_tariff_code(point["agreements"], client) != None:
for meter in point["meters"]:
entities.append(OctopusEnergyLatestElectricityReading(client, point["mpan"], meter["serial_number"]))
entities.append(OctopusEnergyPreviousAccumulativeElectricityReading(client, point["mpan"], meter["serial_number"]))

if len(account_info["gas_meter_points"]) > 0:
for point in account_info["gas_meter_points"]:
# We only care about points that have active agreements
if async_get_active_tariff_code(point["agreements"], client) != None:
for meter in point["meters"]:
entities.append(OctopusEnergyLatestGasReading(client, point["mprn"], meter["serial_number"], is_smets1))
entities.append(OctopusEnergyPreviousAccumulativeGasReading(client, point["mprn"], meter["serial_number"], is_smets1))

async_add_entities(entities, True)
Expand Down

0 comments on commit d263a68

Please sign in to comment.