Ignore MQTT vacuum battery warning (#150211)

This commit is contained in:
Martin Hjelmare
2025-08-07 20:11:39 +02:00
committed by GitHub
parent 6aa077a48d
commit 382bf78ee0
2 changed files with 14 additions and 1 deletions

View File

@@ -79,7 +79,10 @@ DEFAULT_NAME = "Vacuum cleaner robot"
_DEPRECATED_STATE_IDLE = DeprecatedConstantEnum(VacuumActivity.IDLE, "2026.1")
_DEPRECATED_STATE_PAUSED = DeprecatedConstantEnum(VacuumActivity.PAUSED, "2026.1")
_BATTERY_DEPRECATION_IGNORED_PLATFORMS = ("template",)
_BATTERY_DEPRECATION_IGNORED_PLATFORMS = (
"mqtt",
"template",
)
class VacuumEntityFeature(IntFlag):

View File

@@ -2,6 +2,7 @@
from copy import deepcopy
import json
import logging
from typing import Any
from unittest.mock import patch
@@ -395,6 +396,15 @@ async def test_status_with_deprecated_battery_feature(
assert issue.issue_domain == "vacuum"
assert issue.translation_key == "deprecated_vacuum_battery_feature"
assert issue.translation_placeholders == {"entity_id": "vacuum.mqtttest"}
assert not [
record
for record in caplog.records
if record.name == "homeassistant.helpers.frame"
and record.levelno >= logging.WARNING
]
assert (
"mqtt' is setting the battery_level which has been deprecated"
) not in caplog.text
@pytest.mark.parametrize(