mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 14:27:07 +00:00
Bump wled 0.3.0, reduce calls stability improvements (#32903)
This commit is contained in:
parent
7bbffa6e6d
commit
aece76f6cd
@ -26,7 +26,7 @@ from .const import (
|
||||
DOMAIN,
|
||||
)
|
||||
|
||||
SCAN_INTERVAL = timedelta(seconds=10)
|
||||
SCAN_INTERVAL = timedelta(seconds=5)
|
||||
WLED_COMPONENTS = (LIGHT_DOMAIN, SENSOR_DOMAIN, SWITCH_DOMAIN)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
@ -94,7 +94,7 @@ def wled_exception_handler(func):
|
||||
async def handler(self, *args, **kwargs):
|
||||
try:
|
||||
await func(self, *args, **kwargs)
|
||||
await self.coordinator.async_refresh()
|
||||
self.coordinator.update_listeners()
|
||||
|
||||
except WLEDConnectionError as error:
|
||||
_LOGGER.error("Error communicating with API: %s", error)
|
||||
@ -128,7 +128,7 @@ class WLEDDataUpdateCoordinator(DataUpdateCoordinator):
|
||||
async def _async_update_data(self) -> WLEDDevice:
|
||||
"""Fetch data from WLED."""
|
||||
try:
|
||||
return await self.wled.update()
|
||||
return await self.wled.update(full_update=not self.last_update_success)
|
||||
except WLEDError as error:
|
||||
raise UpdateFailed(f"Invalid response from API: {error}")
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
"name": "WLED",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/wled",
|
||||
"requirements": ["wled==0.2.1"],
|
||||
"requirements": ["wled==0.3.0"],
|
||||
"dependencies": [],
|
||||
"zeroconf": ["_wled._tcp.local."],
|
||||
"codeowners": ["@frenck"],
|
||||
|
@ -2105,7 +2105,7 @@ wirelesstagpy==0.4.0
|
||||
withings-api==2.1.3
|
||||
|
||||
# homeassistant.components.wled
|
||||
wled==0.2.1
|
||||
wled==0.3.0
|
||||
|
||||
# homeassistant.components.wunderlist
|
||||
wunderpy2==0.1.6
|
||||
|
@ -736,7 +736,7 @@ watchdog==0.8.3
|
||||
withings-api==2.1.3
|
||||
|
||||
# homeassistant.components.wled
|
||||
wled==0.2.1
|
||||
wled==0.3.0
|
||||
|
||||
# homeassistant.components.bluesound
|
||||
# homeassistant.components.rest
|
||||
|
@ -25,7 +25,19 @@ async def init_integration(
|
||||
|
||||
aioclient_mock.post(
|
||||
"http://example.local:80/json/state",
|
||||
json={"success": True},
|
||||
json={},
|
||||
headers={"Content-Type": "application/json"},
|
||||
)
|
||||
|
||||
aioclient_mock.get(
|
||||
"http://example.local:80/json/info",
|
||||
json={},
|
||||
headers={"Content-Type": "application/json"},
|
||||
)
|
||||
|
||||
aioclient_mock.get(
|
||||
"http://example.local:80/json/state",
|
||||
json={},
|
||||
headers={"Content-Type": "application/json"},
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user