Add missing return type in Advantage Air (#101377)

* Add None return type

* Change mypi type

* Fix mypy issue
This commit is contained in:
Brett Adams 2023-10-06 19:59:27 +10:00 committed by GitHub
parent 20188181f7
commit 00d0767628
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ class AdvantageAirAC(AdvantageAirAcEntity, ClimateEntity):
"""Return the current target temperature."""
# If the system is in MyZone mode, and a zone is set, return that temperature instead.
if (
self._ac["myZone"] > 0
self._myzone
and not self._ac.get(ADVANTAGE_AIR_MYAUTO_ENABLED)
and not self._ac.get(ADVANTAGE_AIR_MYTEMP_ENABLED)
):

View File

@ -63,7 +63,7 @@ class AdvantageAirAcEntity(AdvantageAirEntity):
return self.coordinator.data["aircons"][self.ac_key]["info"]
@property
def _myzone(self) -> dict[str, Any]:
def _myzone(self) -> dict[str, Any] | None:
return self.coordinator.data["aircons"][self.ac_key]["zones"].get(
f"z{self._ac['myZone']:02}"
)