Correct arguments to MQTT will_set (#38036)
parent
01d2d2f315
commit
908b72370b
|
@ -716,7 +716,8 @@ class MQTT:
|
|||
self._mqttc.will_set( # pylint: disable=no-value-for-parameter
|
||||
*attr.astuple(
|
||||
will_message,
|
||||
filter=lambda attr, value: attr.name != "subscribed_topic",
|
||||
filter=lambda attr, value: attr.name
|
||||
not in ["subscribed_topic", "timestamp"],
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -799,13 +799,13 @@ async def test_no_birth_message(hass, mqtt_client_mock, mqtt_mock):
|
|||
)
|
||||
async def test_custom_will_message(hass, mqtt_client_mock, mqtt_mock):
|
||||
"""Test will message."""
|
||||
mqtt_client_mock.will_set.assert_called_with("death", "death", 0, False, None)
|
||||
mqtt_client_mock.will_set.assert_called_with("death", "death", 0, False)
|
||||
|
||||
|
||||
async def test_default_will_message(hass, mqtt_client_mock, mqtt_mock):
|
||||
"""Test will message."""
|
||||
mqtt_client_mock.will_set.assert_called_with(
|
||||
"homeassistant/status", "offline", 0, False, None
|
||||
"homeassistant/status", "offline", 0, False
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue