Skip to content

Commit d045eca

Browse files
authored
Add parallel_updates to SFR Box (home-assistant#157426)
1 parent f7c41e6 commit d045eca

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

homeassistant/components/sfr_box/binary_sensor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
from .coordinator import SFRConfigEntry
2121
from .entity import SFRCoordinatorEntity
2222

23+
# Coordinator is used to centralize the data updates
24+
PARALLEL_UPDATES = 0
25+
2326

2427
@dataclass(frozen=True, kw_only=True)
2528
class SFRBoxBinarySensorEntityDescription[_T](BinarySensorEntityDescription):

homeassistant/components/sfr_box/button.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
from .coordinator import SFRConfigEntry
2525
from .entity import SFREntity
2626

27+
# Coordinator is used to centralize the data updates
28+
# but better to queue action calls to avoid conflicts
29+
PARALLEL_UPDATES = 1
30+
2731

2832
def with_error_wrapping[**_P, _R](
2933
func: Callable[Concatenate[SFRBoxButton, _P], Awaitable[_R]],

homeassistant/components/sfr_box/sensor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
from .coordinator import SFRConfigEntry
2727
from .entity import SFRCoordinatorEntity
2828

29+
# Coordinator is used to centralize the data updates
30+
PARALLEL_UPDATES = 0
31+
2932

3033
@dataclass(frozen=True, kw_only=True)
3134
class SFRBoxSensorEntityDescription[_T](SensorEntityDescription):

0 commit comments

Comments
 (0)