Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion homeassistant/components/mqtt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
DEFAULT_KEEPALIVE = 60
DEFAULT_QOS = 0
DEFAULT_RETAIN = False
DEFAULT_WILL_BIRTH_RETAIN = True
DEFAULT_PROTOCOL = PROTOCOL_311
DEFAULT_DISCOVERY_PREFIX = "homeassistant"
DEFAULT_TLS_PROTOCOL = "auto"
Expand Down Expand Up @@ -195,7 +196,7 @@ def validate_device_has_at_least_one_identifier(value: ConfigType) -> ConfigType
vol.Required(ATTR_TOPIC): valid_publish_topic,
vol.Required(ATTR_PAYLOAD, CONF_PAYLOAD): cv.string,
vol.Optional(ATTR_QOS, default=DEFAULT_QOS): _VALID_QOS_SCHEMA,
vol.Optional(ATTR_RETAIN, default=DEFAULT_RETAIN): cv.boolean,
vol.Optional(ATTR_RETAIN, default=DEFAULT_WILL_BIRTH_RETAIN): cv.boolean,
},
required=True,
)
Expand Down
2 changes: 1 addition & 1 deletion tests/components/mqtt/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ def test_birth_message(hass):
mqtt_client.publish.side_effect = lambda *args: calls.append(args)
hass.data["mqtt"]._mqtt_on_connect(None, None, 0, 0)
yield from hass.async_block_till_done()
assert calls[-1] == ("birth", "birth", 0, False)
assert calls[-1] == ("birth", "birth", 0, True)


@asyncio.coroutine
Expand Down