Skip to content

Commit

Permalink
Set PARALLEL_UPDATES = 0 for MQTT components as no semaphore is needed (
Browse files Browse the repository at this point in the history
  • Loading branch information
jbouwh authored Nov 21, 2024
1 parent 3474642 commit 9444f7a
Show file tree
Hide file tree
Showing 26 changed files with 52 additions and 0 deletions.
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 0

_SUPPORTED_FEATURES = {
"arm_home": AlarmControlPanelEntityFeature.ARM_HOME,
"arm_away": AlarmControlPanelEntityFeature.ARM_AWAY,
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 0

DEFAULT_NAME = "MQTT Binary sensor"
CONF_OFF_DELAY = "off_delay"
DEFAULT_PAYLOAD_OFF = "OFF"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
from .schemas import MQTT_ENTITY_COMMON_SCHEMA
from .util import valid_publish_topic

PARALLEL_UPDATES = 0

CONF_PAYLOAD_PRESS = "payload_press"
DEFAULT_NAME = "MQTT Button"
DEFAULT_PAYLOAD_PRESS = "PRESS"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 0

CONF_IMAGE_ENCODING = "image_encoding"

DEFAULT_NAME = "MQTT Camera"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 0

DEFAULT_NAME = "MQTT HVAC"

CONF_FAN_MODE_COMMAND_TEMPLATE = "fan_mode_command_template"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 0

CONF_GET_POSITION_TOPIC = "position_topic"
CONF_GET_POSITION_TEMPLATE = "position_template"
CONF_SET_POSITION_TOPIC = "set_position_topic"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 0

CONF_PAYLOAD_HOME = "payload_home"
CONF_PAYLOAD_NOT_HOME = "payload_not_home"
CONF_SOURCE_TYPE = "source_type"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 0

CONF_EVENT_TYPES = "event_types"

MQTT_EVENT_ATTRIBUTES_BLOCKED = frozenset(
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
from .schemas import MQTT_ENTITY_COMMON_SCHEMA
from .util import valid_publish_topic, valid_subscribe_topic

PARALLEL_UPDATES = 0

CONF_DIRECTION_STATE_TOPIC = "direction_state_topic"
CONF_DIRECTION_COMMAND_TOPIC = "direction_command_topic"
CONF_DIRECTION_VALUE_TEMPLATE = "direction_value_template"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/humidifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
from .schemas import MQTT_ENTITY_COMMON_SCHEMA
from .util import valid_publish_topic, valid_subscribe_topic

PARALLEL_UPDATES = 0

CONF_AVAILABLE_MODES_LIST = "modes"
CONF_DEVICE_CLASS = "device_class"
CONF_MODE_COMMAND_TEMPLATE = "mode_command_template"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 0

CONF_CONTENT_TYPE = "content_type"
CONF_IMAGE_ENCODING = "image_encoding"
CONF_IMAGE_TOPIC = "image_topic"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/lawn_mower.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 0

CONF_ACTIVITY_STATE_TOPIC = "activity_state_topic"
CONF_ACTIVITY_VALUE_TEMPLATE = "activity_value_template"
CONF_DOCK_COMMAND_TOPIC = "dock_command_topic"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/light/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
MqttLightTemplate,
)

PARALLEL_UPDATES = 0


def validate_mqtt_light_discovery(config_value: dict[str, Any]) -> ConfigType:
"""Validate MQTT light schema for discovery."""
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 0

CONF_CODE_FORMAT = "code_format"

CONF_PAYLOAD_LOCK = "payload_lock"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
from .schemas import MQTT_ENTITY_COMMON_SCHEMA
from .util import valid_publish_topic

PARALLEL_UPDATES = 0

DEFAULT_NAME = "MQTT notify"

PLATFORM_SCHEMA_MODERN = MQTT_BASE_SCHEMA.extend(
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 0

CONF_MIN = "min"
CONF_MAX = "max"
CONF_STEP = "step"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
from .schemas import MQTT_ENTITY_COMMON_SCHEMA
from .util import valid_publish_topic

PARALLEL_UPDATES = 0

DEFAULT_NAME = "MQTT Scene"
DEFAULT_RETAIN = False

Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 0

DEFAULT_NAME = "MQTT Select"

MQTT_SELECT_ATTRIBUTES_BLOCKED = frozenset(
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 0

CONF_EXPIRE_AFTER = "expire_after"
CONF_LAST_RESET_VALUE_TEMPLATE = "last_reset_value_template"
CONF_SUGGESTED_DISPLAY_PRECISION = "suggested_display_precision"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/siren.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
)
from .schemas import MQTT_ENTITY_COMMON_SCHEMA

PARALLEL_UPDATES = 0

DEFAULT_NAME = "MQTT Siren"
DEFAULT_PAYLOAD_ON = "ON"
DEFAULT_PAYLOAD_OFF = "OFF"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
)
from .schemas import MQTT_ENTITY_COMMON_SCHEMA

PARALLEL_UPDATES = 0

DEFAULT_NAME = "MQTT Switch"
DEFAULT_PAYLOAD_ON = "ON"
DEFAULT_PAYLOAD_OFF = "OFF"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 0

CONF_MAX = "max"
CONF_MIN = "min"
CONF_PATTERN = "pattern"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 0

DEFAULT_NAME = "MQTT Update"

CONF_DISPLAY_PRECISION = "display_precision"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
from .schemas import MQTT_ENTITY_COMMON_SCHEMA
from .util import valid_publish_topic

PARALLEL_UPDATES = 0

BATTERY = "battery_level"
FAN_SPEED = "fan_speed"
STATE = "state"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/valve.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 0

CONF_REPORTS_POSITION = "reports_position"

DEFAULT_NAME = "MQTT Valve"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/mqtt/water_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 0

DEFAULT_NAME = "MQTT Water Heater"

MQTT_WATER_HEATER_ATTRIBUTES_BLOCKED = frozenset(
Expand Down

0 comments on commit 9444f7a

Please sign in to comment.