From 00d07676288ec552f40cbd3bb7a2675df1b02aa2 Mon Sep 17 00:00:00 2001 From: Brett Adams Date: Fri, 6 Oct 2023 19:59:27 +1000 Subject: [PATCH] Add missing return type in Advantage Air (#101377) * Add None return type * Change mypi type * Fix mypy issue --- homeassistant/components/advantage_air/climate.py | 2 +- homeassistant/components/advantage_air/entity.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/advantage_air/climate.py b/homeassistant/components/advantage_air/climate.py index cda123f62ee..a4e0a1033ba 100644 --- a/homeassistant/components/advantage_air/climate.py +++ b/homeassistant/components/advantage_air/climate.py @@ -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) ): diff --git a/homeassistant/components/advantage_air/entity.py b/homeassistant/components/advantage_air/entity.py index b300a677793..691db99769b 100644 --- a/homeassistant/components/advantage_air/entity.py +++ b/homeassistant/components/advantage_air/entity.py @@ -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}" )