Use cache update for WIFI blinds (#108224)

pull/105955/head
starkillerOG 2024-01-18 03:34:18 +01:00 committed by GitHub
parent 274d501bca
commit 154fe8631a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import logging
from socket import timeout
from typing import Any
from motionblinds import ParseException
from motionblinds import DEVICE_TYPES_WIFI, ParseException
from homeassistant.core import HomeAssistant
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
@ -59,7 +59,9 @@ class DataUpdateCoordinatorMotionBlinds(DataUpdateCoordinator):
def update_blind(self, blind):
"""Fetch data from a blind."""
try:
if self._wait_for_push:
if blind.device_type in DEVICE_TYPES_WIFI:
blind.Update_from_cache()
elif self._wait_for_push:
blind.Update()
else:
blind.Update_trigger()