mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Explictly set PARALLEL_UPDATES for ESPHome entity platforms (#143065)
This commit is contained in:
parent
4a4cbe011a
commit
f4e7ccfcfc
@ -29,6 +29,8 @@ from .entity import (
|
|||||||
)
|
)
|
||||||
from .enum_mapper import EsphomeEnumMapper
|
from .enum_mapper import EsphomeEnumMapper
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
_ESPHOME_ACP_STATE_TO_HASS_STATE: EsphomeEnumMapper[
|
_ESPHOME_ACP_STATE_TO_HASS_STATE: EsphomeEnumMapper[
|
||||||
ESPHomeAlarmControlPanelState, AlarmControlPanelState
|
ESPHomeAlarmControlPanelState, AlarmControlPanelState
|
||||||
] = EsphomeEnumMapper(
|
] = EsphomeEnumMapper(
|
||||||
|
@ -20,6 +20,8 @@ from .const import DOMAIN
|
|||||||
from .entity import EsphomeAssistEntity, EsphomeEntity, platform_async_setup_entry
|
from .entity import EsphomeAssistEntity, EsphomeEntity, platform_async_setup_entry
|
||||||
from .entry_data import ESPHomeConfigEntry
|
from .entry_data import ESPHomeConfigEntry
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(
|
async def async_setup_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
@ -16,6 +16,8 @@ from .entity import (
|
|||||||
platform_async_setup_entry,
|
platform_async_setup_entry,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
class EsphomeButton(EsphomeEntity[ButtonInfo, EntityState], ButtonEntity):
|
class EsphomeButton(EsphomeEntity[ButtonInfo, EntityState], ButtonEntity):
|
||||||
"""A button implementation for ESPHome."""
|
"""A button implementation for ESPHome."""
|
||||||
|
@ -16,6 +16,8 @@ from homeassistant.core import callback
|
|||||||
|
|
||||||
from .entity import EsphomeEntity, platform_async_setup_entry
|
from .entity import EsphomeEntity, platform_async_setup_entry
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
class EsphomeCamera(Camera, EsphomeEntity[CameraInfo, CameraState]):
|
class EsphomeCamera(Camera, EsphomeEntity[CameraInfo, CameraState]):
|
||||||
"""A camera implementation for ESPHome."""
|
"""A camera implementation for ESPHome."""
|
||||||
|
@ -65,6 +65,8 @@ from .entity import (
|
|||||||
)
|
)
|
||||||
from .enum_mapper import EsphomeEnumMapper
|
from .enum_mapper import EsphomeEnumMapper
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
FAN_QUIET = "quiet"
|
FAN_QUIET = "quiet"
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ from .entity import (
|
|||||||
platform_async_setup_entry,
|
platform_async_setup_entry,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
class EsphomeCover(EsphomeEntity[CoverInfo, CoverState], CoverEntity):
|
class EsphomeCover(EsphomeEntity[CoverInfo, CoverState], CoverEntity):
|
||||||
"""A cover implementation for ESPHome."""
|
"""A cover implementation for ESPHome."""
|
||||||
|
@ -11,6 +11,8 @@ from homeassistant.components.date import DateEntity
|
|||||||
|
|
||||||
from .entity import EsphomeEntity, esphome_state_property, platform_async_setup_entry
|
from .entity import EsphomeEntity, esphome_state_property, platform_async_setup_entry
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
class EsphomeDate(EsphomeEntity[DateInfo, DateState], DateEntity):
|
class EsphomeDate(EsphomeEntity[DateInfo, DateState], DateEntity):
|
||||||
"""A date implementation for esphome."""
|
"""A date implementation for esphome."""
|
||||||
|
@ -12,6 +12,8 @@ from homeassistant.util import dt as dt_util
|
|||||||
|
|
||||||
from .entity import EsphomeEntity, esphome_state_property, platform_async_setup_entry
|
from .entity import EsphomeEntity, esphome_state_property, platform_async_setup_entry
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
class EsphomeDateTime(EsphomeEntity[DateTimeInfo, DateTimeState], DateTimeEntity):
|
class EsphomeDateTime(EsphomeEntity[DateTimeInfo, DateTimeState], DateTimeEntity):
|
||||||
"""A datetime implementation for esphome."""
|
"""A datetime implementation for esphome."""
|
||||||
|
@ -12,6 +12,8 @@ from homeassistant.util.enum import try_parse_enum
|
|||||||
|
|
||||||
from .entity import EsphomeEntity, platform_async_setup_entry
|
from .entity import EsphomeEntity, platform_async_setup_entry
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
class EsphomeEvent(EsphomeEntity[EventInfo, Event], EventEntity):
|
class EsphomeEvent(EsphomeEntity[EventInfo, Event], EventEntity):
|
||||||
"""An event implementation for ESPHome."""
|
"""An event implementation for ESPHome."""
|
||||||
|
@ -30,6 +30,8 @@ from .entity import (
|
|||||||
)
|
)
|
||||||
from .enum_mapper import EsphomeEnumMapper
|
from .enum_mapper import EsphomeEnumMapper
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
ORDERED_NAMED_FAN_SPEEDS = [FanSpeed.LOW, FanSpeed.MEDIUM, FanSpeed.HIGH]
|
ORDERED_NAMED_FAN_SPEEDS = [FanSpeed.LOW, FanSpeed.MEDIUM, FanSpeed.HIGH]
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,6 +38,8 @@ from .entity import (
|
|||||||
platform_async_setup_entry,
|
platform_async_setup_entry,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
FLASH_LENGTHS = {FLASH_SHORT: 2, FLASH_LONG: 10}
|
FLASH_LENGTHS = {FLASH_SHORT: 2, FLASH_LONG: 10}
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@ from .entity import (
|
|||||||
platform_async_setup_entry,
|
platform_async_setup_entry,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
class EsphomeLock(EsphomeEntity[LockInfo, LockEntityState], LockEntity):
|
class EsphomeLock(EsphomeEntity[LockInfo, LockEntityState], LockEntity):
|
||||||
"""A lock implementation for ESPHome."""
|
"""A lock implementation for ESPHome."""
|
||||||
|
@ -41,6 +41,8 @@ from .entity import (
|
|||||||
from .enum_mapper import EsphomeEnumMapper
|
from .enum_mapper import EsphomeEnumMapper
|
||||||
from .ffmpeg_proxy import async_create_proxy_url
|
from .ffmpeg_proxy import async_create_proxy_url
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
_STATES: EsphomeEnumMapper[EspMediaPlayerState, MediaPlayerState] = EsphomeEnumMapper(
|
_STATES: EsphomeEnumMapper[EspMediaPlayerState, MediaPlayerState] = EsphomeEnumMapper(
|
||||||
|
@ -23,6 +23,8 @@ from .entity import (
|
|||||||
)
|
)
|
||||||
from .enum_mapper import EsphomeEnumMapper
|
from .enum_mapper import EsphomeEnumMapper
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
NUMBER_MODES: EsphomeEnumMapper[EsphomeNumberMode, NumberMode] = EsphomeEnumMapper(
|
NUMBER_MODES: EsphomeEnumMapper[EsphomeNumberMode, NumberMode] = EsphomeEnumMapper(
|
||||||
{
|
{
|
||||||
EsphomeNumberMode.AUTO: NumberMode.AUTO,
|
EsphomeNumberMode.AUTO: NumberMode.AUTO,
|
||||||
|
@ -25,6 +25,8 @@ from .entity import (
|
|||||||
)
|
)
|
||||||
from .entry_data import ESPHomeConfigEntry, RuntimeEntryData
|
from .entry_data import ESPHomeConfigEntry, RuntimeEntryData
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(
|
async def async_setup_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
@ -29,6 +29,8 @@ from homeassistant.util.enum import try_parse_enum
|
|||||||
from .entity import EsphomeEntity, platform_async_setup_entry
|
from .entity import EsphomeEntity, platform_async_setup_entry
|
||||||
from .enum_mapper import EsphomeEnumMapper
|
from .enum_mapper import EsphomeEnumMapper
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(
|
async def async_setup_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
@ -18,6 +18,8 @@ from .entity import (
|
|||||||
platform_async_setup_entry,
|
platform_async_setup_entry,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
class EsphomeSwitch(EsphomeEntity[SwitchInfo, SwitchState], SwitchEntity):
|
class EsphomeSwitch(EsphomeEntity[SwitchInfo, SwitchState], SwitchEntity):
|
||||||
"""A switch implementation for ESPHome."""
|
"""A switch implementation for ESPHome."""
|
||||||
|
@ -17,6 +17,8 @@ from .entity import (
|
|||||||
)
|
)
|
||||||
from .enum_mapper import EsphomeEnumMapper
|
from .enum_mapper import EsphomeEnumMapper
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
TEXT_MODES: EsphomeEnumMapper[EsphomeTextMode, TextMode] = EsphomeEnumMapper(
|
TEXT_MODES: EsphomeEnumMapper[EsphomeTextMode, TextMode] = EsphomeEnumMapper(
|
||||||
{
|
{
|
||||||
EsphomeTextMode.TEXT: TextMode.TEXT,
|
EsphomeTextMode.TEXT: TextMode.TEXT,
|
||||||
|
@ -11,6 +11,8 @@ from homeassistant.components.time import TimeEntity
|
|||||||
|
|
||||||
from .entity import EsphomeEntity, esphome_state_property, platform_async_setup_entry
|
from .entity import EsphomeEntity, esphome_state_property, platform_async_setup_entry
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
class EsphomeTime(EsphomeEntity[TimeInfo, TimeState], TimeEntity):
|
class EsphomeTime(EsphomeEntity[TimeInfo, TimeState], TimeEntity):
|
||||||
"""A time implementation for esphome."""
|
"""A time implementation for esphome."""
|
||||||
|
@ -38,6 +38,8 @@ from .entity import (
|
|||||||
)
|
)
|
||||||
from .entry_data import RuntimeEntryData
|
from .entry_data import RuntimeEntryData
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
KEY_UPDATE_LOCK = "esphome_update_lock"
|
KEY_UPDATE_LOCK = "esphome_update_lock"
|
||||||
|
|
||||||
NO_FEATURES = UpdateEntityFeature(0)
|
NO_FEATURES = UpdateEntityFeature(0)
|
||||||
|
@ -22,6 +22,8 @@ from .entity import (
|
|||||||
platform_async_setup_entry,
|
platform_async_setup_entry,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
class EsphomeValve(EsphomeEntity[ValveInfo, ValveState], ValveEntity):
|
class EsphomeValve(EsphomeEntity[ValveInfo, ValveState], ValveEntity):
|
||||||
"""A valve implementation for ESPHome."""
|
"""A valve implementation for ESPHome."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user