Skip to content

Commit

Permalink
Mini refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
faanskit committed Feb 4, 2024
1 parent 6c735df commit bdf07bd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/checkwatt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
}
)

CHECKWATTRANK_REPORTER = "HomeAssistantV2"


class CheckwattResp(TypedDict):
"""API response."""
Expand Down Expand Up @@ -168,7 +170,7 @@ async def update_history_items(call: ServiceCall) -> ServiceResponse:
"installed_power": cw.battery_charge_peak_ac,
"electricity_company": energy_provider,
"reseller_id": cw.reseller_id,
"reporter": "HomeAssistantV2",
"reporter": CHECKWATTRANK_REPORTER,
"historical_data": hd,
}

Expand Down Expand Up @@ -481,7 +483,7 @@ async def push_to_checkwatt_rank(self, cw_inst, cwr_name):
"today_fee": 0,
"today_net_income": self.fcrd_today_net_revenue,
"reseller_id": cw_inst.reseller_id,
"reporter": "HomeAssistantV2",
"reporter": CHECKWATTRANK_REPORTER,
}
if BASIC_TEST:
payload["display_name"] = "xxTESTxx"
Expand Down

0 comments on commit bdf07bd

Please sign in to comment.