Fix dangerous-default-value warnings in mqtt tests (#119584)

This commit is contained in:
epenet 2024-06-13 16:51:45 +02:00 committed by GitHub
parent e34c42c0a9
commit 27ee204e2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -61,8 +61,8 @@ DEFAULT_CONFIG = {
async def async_turn_on( async def async_turn_on(
hass: HomeAssistant, hass: HomeAssistant,
entity_id: str = ENTITY_MATCH_ALL, entity_id: str,
parameters: dict[str, Any] = {}, parameters: dict[str, Any],
) -> None: ) -> None:
"""Turn all or specified siren on.""" """Turn all or specified siren on."""
data = {ATTR_ENTITY_ID: entity_id} if entity_id else {} data = {ATTR_ENTITY_ID: entity_id} if entity_id else {}
@ -144,7 +144,7 @@ async def test_sending_mqtt_commands_and_optimistic(
assert state.state == STATE_OFF assert state.state == STATE_OFF
assert state.attributes.get(ATTR_ASSUMED_STATE) assert state.attributes.get(ATTR_ASSUMED_STATE)
await async_turn_on(hass, entity_id="siren.test") await async_turn_on(hass, entity_id="siren.test", parameters={})
mqtt_mock.async_publish.assert_called_once_with( mqtt_mock.async_publish.assert_called_once_with(
"command-topic", '{"state":"beer on"}', 2, False "command-topic", '{"state":"beer on"}', 2, False