From 0b22e47c53b63bd071deaf3a3d24d97ebc92f1a0 Mon Sep 17 00:00:00 2001 From: Thibaut Date: Tue, 14 Jun 2022 15:17:40 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20max=5Fvalue=20access=20for=20number=20pla?= =?UTF-8?q?tform=20in=E2=80=AFOverkiz=20(#73479)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix wrong property name --- homeassistant/components/overkiz/number.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/overkiz/number.py b/homeassistant/components/overkiz/number.py index 741c666a42a8cb..167065e9015fe1 100644 --- a/homeassistant/components/overkiz/number.py +++ b/homeassistant/components/overkiz/number.py @@ -134,7 +134,7 @@ def value(self) -> float | None: """Return the entity value to represent the entity state.""" if state := self.device.states.get(self.entity_description.key): if self.entity_description.inverted: - return self._attr_max_value - cast(float, state.value) + return self.max_value - cast(float, state.value) return cast(float, state.value) @@ -143,7 +143,7 @@ def value(self) -> float | None: async def async_set_value(self, value: float) -> None: """Set new value.""" if self.entity_description.inverted: - value = self._attr_max_value - value + value = self.max_value - value await self.executor.async_execute_command( self.entity_description.command, value