From f323289d2a95ef5d65c6cefb1f241505e19d3801 Mon Sep 17 00:00:00 2001 From: Martin Hjelmare Date: Thu, 23 Jun 2022 13:28:26 +0200 Subject: [PATCH] Fix tradfri reachable not needed cast --- homeassistant/components/tradfri/entity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/tradfri/entity.py b/homeassistant/components/tradfri/entity.py index f7ccf957179..6d85a54e039 100644 --- a/homeassistant/components/tradfri/entity.py +++ b/homeassistant/components/tradfri/entity.py @@ -5,7 +5,7 @@ from __future__ import annotations from abc import abstractmethod from collections.abc import Callable, Coroutine from functools import wraps -from typing import Any, cast +from typing import Any from pytradfri.api.aiocoap_api import APIRequestProtocol from pytradfri.command import Command @@ -85,4 +85,4 @@ class TradfriBaseEntity(CoordinatorEntity[TradfriDeviceDataUpdateCoordinator]): @property def available(self) -> bool: """Return if entity is available.""" - return cast(bool, self._device.reachable) and super().available + return self._device.reachable and super().available