mirror of
https://github.com/home-assistant/core.git
synced 2026-07-04 05:05:38 +01:00
Homee: fix unavailable entities (#175367)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
from typing import override
|
||||
|
||||
from pyHomee.const import AttributeState, AttributeType, NodeProfile, NodeState
|
||||
from pyHomee.const import AttributeType, NodeProfile, NodeState
|
||||
from pyHomee.model import HomeeAttribute, HomeeNode
|
||||
from websockets.exceptions import ConnectionClosed
|
||||
|
||||
@@ -65,7 +65,7 @@ class HomeeEntity(Entity):
|
||||
@override
|
||||
def available(self) -> bool:
|
||||
"""Return the availability of the underlying node."""
|
||||
return (self._attribute.state == AttributeState.NORMAL) and self._host_connected
|
||||
return (self._attribute.state < 5) and self._host_connected
|
||||
|
||||
async def async_set_homee_value(self, value: float) -> None:
|
||||
"""Set an attribute value on the homee node."""
|
||||
|
||||
Reference in New Issue
Block a user