From b9dbf07a5e7e00a8e04c3b5c683ad11621f1658b Mon Sep 17 00:00:00 2001 From: elmurato <1382097+elmurato@users.noreply.github.com> Date: Tue, 25 Feb 2025 15:09:58 +0100 Subject: [PATCH] Set PARALLEL_UPDATES in all Minecraft Server platforms (#139259) --- homeassistant/components/minecraft_server/binary_sensor.py | 3 +++ .../components/minecraft_server/quality_scale.yaml | 6 +----- homeassistant/components/minecraft_server/sensor.py | 3 +++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/minecraft_server/binary_sensor.py b/homeassistant/components/minecraft_server/binary_sensor.py index 39e12228451..a7279040a6d 100644 --- a/homeassistant/components/minecraft_server/binary_sensor.py +++ b/homeassistant/components/minecraft_server/binary_sensor.py @@ -22,6 +22,9 @@ BINARY_SENSOR_DESCRIPTIONS = [ ), ] +# Coordinator is used to centralize the data updates. +PARALLEL_UPDATES = 0 + async def async_setup_entry( hass: HomeAssistant, diff --git a/homeassistant/components/minecraft_server/quality_scale.yaml b/homeassistant/components/minecraft_server/quality_scale.yaml index 6cf1fc7772e..61a975632bb 100644 --- a/homeassistant/components/minecraft_server/quality_scale.yaml +++ b/homeassistant/components/minecraft_server/quality_scale.yaml @@ -51,11 +51,7 @@ rules: log-when-unavailable: status: done comment: Handled by coordinator. - parallel-updates: - status: todo - comment: | - Although this is handled by the coordinator and no service actions are provided, - PARALLEL_UPDATES should still be set to 0 in binary_sensor and sensor according to the rule. + parallel-updates: done reauthentication-flow: status: exempt comment: No authentication is required for the integration. diff --git a/homeassistant/components/minecraft_server/sensor.py b/homeassistant/components/minecraft_server/sensor.py index 6effa53fbf2..cfc16c7724d 100644 --- a/homeassistant/components/minecraft_server/sensor.py +++ b/homeassistant/components/minecraft_server/sensor.py @@ -30,6 +30,9 @@ KEY_VERSION = "version" UNIT_PLAYERS_MAX = "players" UNIT_PLAYERS_ONLINE = "players" +# Coordinator is used to centralize the data updates. +PARALLEL_UPDATES = 0 + @dataclass(frozen=True, kw_only=True) class MinecraftServerSensorEntityDescription(SensorEntityDescription):