mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Remove Throttle on async_setup and bump pyvizio version (#31337)
This commit is contained in:
parent
6a7bb7b149
commit
a0067a298a
@ -1,6 +1,4 @@
|
|||||||
"""Constants used by vizio component."""
|
"""Constants used by vizio component."""
|
||||||
from datetime import timedelta
|
|
||||||
|
|
||||||
from pyvizio.const import (
|
from pyvizio.const import (
|
||||||
DEVICE_CLASS_SPEAKER as VIZIO_DEVICE_CLASS_SPEAKER,
|
DEVICE_CLASS_SPEAKER as VIZIO_DEVICE_CLASS_SPEAKER,
|
||||||
DEVICE_CLASS_TV as VIZIO_DEVICE_CLASS_TV,
|
DEVICE_CLASS_TV as VIZIO_DEVICE_CLASS_TV,
|
||||||
@ -72,6 +70,3 @@ VIZIO_SCHEMA = {
|
|||||||
vol.Coerce(int), vol.Range(min=1, max=10)
|
vol.Coerce(int), vol.Range(min=1, max=10)
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
MIN_TIME_BETWEEN_FORCED_SCANS = timedelta(seconds=1)
|
|
||||||
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10)
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"domain": "vizio",
|
"domain": "vizio",
|
||||||
"name": "Vizio SmartCast TV",
|
"name": "Vizio SmartCast TV",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/vizio",
|
"documentation": "https://www.home-assistant.io/integrations/vizio",
|
||||||
"requirements": ["pyvizio==0.1.4"],
|
"requirements": ["pyvizio==0.1.16"],
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"codeowners": ["@raman325"],
|
"codeowners": ["@raman325"],
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
|
@ -5,7 +5,6 @@ from typing import Callable, List
|
|||||||
|
|
||||||
from pyvizio import VizioAsync
|
from pyvizio import VizioAsync
|
||||||
|
|
||||||
from homeassistant import util
|
|
||||||
from homeassistant.components.media_player import MediaPlayerDevice
|
from homeassistant.components.media_player import MediaPlayerDevice
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
@ -32,8 +31,6 @@ from .const import (
|
|||||||
DEVICE_ID,
|
DEVICE_ID,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
ICON,
|
ICON,
|
||||||
MIN_TIME_BETWEEN_FORCED_SCANS,
|
|
||||||
MIN_TIME_BETWEEN_SCANS,
|
|
||||||
SUPPORTED_COMMANDS,
|
SUPPORTED_COMMANDS,
|
||||||
VIZIO_DEVICE_CLASSES,
|
VIZIO_DEVICE_CLASSES,
|
||||||
)
|
)
|
||||||
@ -111,7 +108,6 @@ class VizioDevice(MediaPlayerDevice):
|
|||||||
self._icon = ICON[device_class]
|
self._icon = ICON[device_class]
|
||||||
self._available = True
|
self._available = True
|
||||||
|
|
||||||
@util.Throttle(MIN_TIME_BETWEEN_SCANS, MIN_TIME_BETWEEN_FORCED_SCANS)
|
|
||||||
async def async_update(self) -> None:
|
async def async_update(self) -> None:
|
||||||
"""Retrieve latest state of the device."""
|
"""Retrieve latest state of the device."""
|
||||||
is_on = await self._device.get_power_state(log_api_exception=False)
|
is_on = await self._device.get_power_state(log_api_exception=False)
|
||||||
|
@ -1696,7 +1696,7 @@ pyversasense==0.0.6
|
|||||||
pyvesync==1.1.0
|
pyvesync==1.1.0
|
||||||
|
|
||||||
# homeassistant.components.vizio
|
# homeassistant.components.vizio
|
||||||
pyvizio==0.1.4
|
pyvizio==0.1.16
|
||||||
|
|
||||||
# homeassistant.components.velux
|
# homeassistant.components.velux
|
||||||
pyvlx==0.2.12
|
pyvlx==0.2.12
|
||||||
|
@ -567,7 +567,7 @@ pyvera==0.3.7
|
|||||||
pyvesync==1.1.0
|
pyvesync==1.1.0
|
||||||
|
|
||||||
# homeassistant.components.vizio
|
# homeassistant.components.vizio
|
||||||
pyvizio==0.1.4
|
pyvizio==0.1.16
|
||||||
|
|
||||||
# homeassistant.components.html5
|
# homeassistant.components.html5
|
||||||
pywebpush==1.9.2
|
pywebpush==1.9.2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user