Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions homeassistant/components/zwave_js/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
from .discovery import ZwaveDiscoveryInfo
from .entity import ZWaveBaseEntity

PARALLEL_UPDATES = 0

LOGGER = logging.getLogger(__name__)


Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/zwave_js/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from .const import DATA_CLIENT, DOMAIN, LOGGER
from .helpers import get_device_id, get_valueless_base_unique_id

PARALLEL_UPDATES = 0


async def async_setup_entry(
hass: HomeAssistant,
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/zwave_js/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
from .entity import ZWaveBaseEntity
from .helpers import get_value_of_zwave_value

PARALLEL_UPDATES = 0

# Map Z-Wave HVAC Mode to Home Assistant value
# Note: We treat "auto" as "heat_cool" as most Z-Wave devices
# report auto_changeover as auto without schedule support.
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/zwave_js/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
from .discovery_data_template import CoverTiltDataTemplate
from .entity import ZWaveBaseEntity

PARALLEL_UPDATES = 0

LOGGER = logging.getLogger(__name__)


Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/zwave_js/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
from .entity import ZWaveBaseEntity
from .helpers import get_value_of_zwave_value

PARALLEL_UPDATES = 0

DEFAULT_SPEED_RANGE = (1, 99) # off is not included

ATTR_FAN_STATE = "fan_state"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/zwave_js/humidifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
from .discovery import ZwaveDiscoveryInfo
from .entity import ZWaveBaseEntity

PARALLEL_UPDATES = 0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this was already the default for any async integration.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, looks like it

if parallel_updates is None and not entity_has_async_update:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Any async integration", no we don't check that. We check for async_update attribute. Which not all async integrations may use.

entity.add_to_platform_start(
self.hass,
self,
self._get_parallel_updates_semaphore(hasattr(entity, "async_update")),
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right and to be more explicit, we don't rely on polling at all, it's all push, so there are no platforms with an update method, sync or async

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aaah yeah, ok that default is not very good. Maybe we also set it to 0 if we don't find any update method ? (So set it to 1 if we find "update" as a method.)

Copy link
Copy Markdown
Contributor Author

@raman325 raman325 May 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would that still be potentially a concern if the services are synchronous?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will merge this and think about it some more.



@dataclass
class ZwaveHumidifierEntityDescriptionRequiredKeys:
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/zwave_js/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
from .discovery import ZwaveDiscoveryInfo
from .entity import ZWaveBaseEntity

PARALLEL_UPDATES = 0

LOGGER = logging.getLogger(__name__)

MULTI_COLOR_MAP = {
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/zwave_js/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
from .discovery import ZwaveDiscoveryInfo
from .entity import ZWaveBaseEntity

PARALLEL_UPDATES = 0

LOGGER = logging.getLogger(__name__)

STATE_TO_ZWAVE_MAP: dict[int, dict[str, int | bool]] = {
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/zwave_js/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from .discovery import ZwaveDiscoveryInfo
from .entity import ZWaveBaseEntity

PARALLEL_UPDATES = 0


async def async_setup_entry(
hass: HomeAssistant,
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/zwave_js/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
from .discovery import ZwaveDiscoveryInfo
from .entity import ZWaveBaseEntity

PARALLEL_UPDATES = 0


async def async_setup_entry(
hass: HomeAssistant,
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/zwave_js/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
from .entity import ZWaveBaseEntity
from .helpers import get_device_id, get_valueless_base_unique_id

PARALLEL_UPDATES = 0

LOGGER = logging.getLogger(__name__)

STATUS_ICON: dict[NodeStatus, str] = {
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/zwave_js/siren.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
from .discovery import ZwaveDiscoveryInfo
from .entity import ZWaveBaseEntity

PARALLEL_UPDATES = 0


async def async_setup_entry(
hass: HomeAssistant,
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/zwave_js/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
from .discovery import ZwaveDiscoveryInfo
from .entity import ZWaveBaseEntity

PARALLEL_UPDATES = 0

LOGGER = logging.getLogger(__name__)


Expand Down