Fix dangerous-default-value warnings in mqtt tests (#119584)
This commit is contained in:
parent
e34c42c0a9
commit
27ee204e2f
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue