Skip to content

Commit

Permalink
Use cache update for WIFI blinds (#108224)
Browse files Browse the repository at this point in the history
  • Loading branch information
starkillerOG authored Jan 18, 2024
1 parent 274d501 commit 154fe86
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions homeassistant/components/motion_blinds/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
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
Expand Down Expand Up @@ -59,7 +59,9 @@ def update_gateway(self):
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()
Expand Down

0 comments on commit 154fe86

Please sign in to comment.