Skip to content

Commit

Permalink
requested contract type not found, #15
Browse files Browse the repository at this point in the history
  • Loading branch information
myTselection committed Jan 15, 2024
1 parent ab9340d commit 778a3c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions custom_components/myenergy/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ async def async_update(self):
self._name = f"{NAME} {self._postalcode} {self._fuel_type.fullnameEN} {self._contract_type.fullname}"
self._contract_type_details = self._details.get(self._contract_type.code)
# _LOGGER.debug(f"self._contract_type_details: {self._contract_type_details}")
if self._contract_type_details == None:
_LOGGER.warning(f"{NAME} requested contract type {self._contract_type.code} not found, available data: {self._details}")
return
for fueltype_name in self._contract_type_details.keys():
if self._fuel_type.fullnameNL in fueltype_name:
fueltype_detail = self._contract_type_details.get(fueltype_name)
Expand Down

0 comments on commit 778a3c0

Please sign in to comment.