mirror of
https://github.com/home-assistant/core.git
synced 2025-06-20 21:17:06 +00:00
Update denonavr to 0.11.4
(#101169)
This commit is contained in:
parent
9b754a58f4
commit
fd1f0b0efe
@ -6,7 +6,7 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/denonavr",
|
"documentation": "https://www.home-assistant.io/integrations/denonavr",
|
||||||
"iot_class": "local_push",
|
"iot_class": "local_push",
|
||||||
"loggers": ["denonavr"],
|
"loggers": ["denonavr"],
|
||||||
"requirements": ["denonavr==0.11.3"],
|
"requirements": ["denonavr==0.11.4"],
|
||||||
"ssdp": [
|
"ssdp": [
|
||||||
{
|
{
|
||||||
"manufacturer": "Denon",
|
"manufacturer": "Denon",
|
||||||
|
@ -8,7 +8,15 @@ import logging
|
|||||||
from typing import Any, Concatenate, ParamSpec, TypeVar
|
from typing import Any, Concatenate, ParamSpec, TypeVar
|
||||||
|
|
||||||
from denonavr import DenonAVR
|
from denonavr import DenonAVR
|
||||||
from denonavr.const import POWER_ON, STATE_OFF, STATE_ON, STATE_PAUSED, STATE_PLAYING
|
from denonavr.const import (
|
||||||
|
ALL_TELNET_EVENTS,
|
||||||
|
ALL_ZONES,
|
||||||
|
POWER_ON,
|
||||||
|
STATE_OFF,
|
||||||
|
STATE_ON,
|
||||||
|
STATE_PAUSED,
|
||||||
|
STATE_PLAYING,
|
||||||
|
)
|
||||||
from denonavr.exceptions import (
|
from denonavr.exceptions import (
|
||||||
AvrCommandError,
|
AvrCommandError,
|
||||||
AvrForbiddenError,
|
AvrForbiddenError,
|
||||||
@ -73,6 +81,23 @@ SERVICE_GET_COMMAND = "get_command"
|
|||||||
SERVICE_SET_DYNAMIC_EQ = "set_dynamic_eq"
|
SERVICE_SET_DYNAMIC_EQ = "set_dynamic_eq"
|
||||||
SERVICE_UPDATE_AUDYSSEY = "update_audyssey"
|
SERVICE_UPDATE_AUDYSSEY = "update_audyssey"
|
||||||
|
|
||||||
|
# HA Telnet events
|
||||||
|
TELNET_EVENTS = {
|
||||||
|
"HD",
|
||||||
|
"MS",
|
||||||
|
"MU",
|
||||||
|
"MV",
|
||||||
|
"NS",
|
||||||
|
"NSE",
|
||||||
|
"PS",
|
||||||
|
"SI",
|
||||||
|
"SS",
|
||||||
|
"TF",
|
||||||
|
"ZM",
|
||||||
|
"Z2",
|
||||||
|
"Z3",
|
||||||
|
}
|
||||||
|
|
||||||
_DenonDeviceT = TypeVar("_DenonDeviceT", bound="DenonDevice")
|
_DenonDeviceT = TypeVar("_DenonDeviceT", bound="DenonDevice")
|
||||||
_R = TypeVar("_R")
|
_R = TypeVar("_R")
|
||||||
_P = ParamSpec("_P")
|
_P = ParamSpec("_P")
|
||||||
@ -254,7 +279,9 @@ class DenonDevice(MediaPlayerEntity):
|
|||||||
async def _telnet_callback(self, zone, event, parameter) -> None:
|
async def _telnet_callback(self, zone, event, parameter) -> None:
|
||||||
"""Process a telnet command callback."""
|
"""Process a telnet command callback."""
|
||||||
# There are multiple checks implemented which reduce unnecessary updates of the ha state machine
|
# There are multiple checks implemented which reduce unnecessary updates of the ha state machine
|
||||||
if zone != self._receiver.zone:
|
if zone not in (self._receiver.zone, ALL_ZONES):
|
||||||
|
return
|
||||||
|
if event not in TELNET_EVENTS:
|
||||||
return
|
return
|
||||||
# Some updates trigger multiple events like one for artist and one for title for one change
|
# Some updates trigger multiple events like one for artist and one for title for one change
|
||||||
# We skip every event except the last one
|
# We skip every event except the last one
|
||||||
@ -268,11 +295,11 @@ class DenonDevice(MediaPlayerEntity):
|
|||||||
|
|
||||||
async def async_added_to_hass(self) -> None:
|
async def async_added_to_hass(self) -> None:
|
||||||
"""Register for telnet events."""
|
"""Register for telnet events."""
|
||||||
self._receiver.register_callback("ALL", self._telnet_callback)
|
self._receiver.register_callback(ALL_TELNET_EVENTS, self._telnet_callback)
|
||||||
|
|
||||||
async def async_will_remove_from_hass(self) -> None:
|
async def async_will_remove_from_hass(self) -> None:
|
||||||
"""Clean up the entity."""
|
"""Clean up the entity."""
|
||||||
self._receiver.unregister_callback("ALL", self._telnet_callback)
|
self._receiver.unregister_callback(ALL_TELNET_EVENTS, self._telnet_callback)
|
||||||
|
|
||||||
@async_log_errors
|
@async_log_errors
|
||||||
async def async_update(self) -> None:
|
async def async_update(self) -> None:
|
||||||
|
@ -668,7 +668,7 @@ deluge-client==1.7.1
|
|||||||
demetriek==0.4.0
|
demetriek==0.4.0
|
||||||
|
|
||||||
# homeassistant.components.denonavr
|
# homeassistant.components.denonavr
|
||||||
denonavr==0.11.3
|
denonavr==0.11.4
|
||||||
|
|
||||||
# homeassistant.components.devolo_home_control
|
# homeassistant.components.devolo_home_control
|
||||||
devolo-home-control-api==0.18.2
|
devolo-home-control-api==0.18.2
|
||||||
|
@ -545,7 +545,7 @@ deluge-client==1.7.1
|
|||||||
demetriek==0.4.0
|
demetriek==0.4.0
|
||||||
|
|
||||||
# homeassistant.components.denonavr
|
# homeassistant.components.denonavr
|
||||||
denonavr==0.11.3
|
denonavr==0.11.4
|
||||||
|
|
||||||
# homeassistant.components.devolo_home_control
|
# homeassistant.components.devolo_home_control
|
||||||
devolo-home-control-api==0.18.2
|
devolo-home-control-api==0.18.2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user