Simplify ZHA config entry title (#76991)
This commit is contained in:
parent
88a5b90489
commit
21ebd1f612
2 changed files with 3 additions and 6 deletions
|
@ -128,7 +128,7 @@ class ZhaFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
return self.async_abort(reason="not_zha_device")
|
||||
|
||||
self._device_path = dev_path
|
||||
self._title = usb.human_readable_device_name(
|
||||
self._title = description or usb.human_readable_device_name(
|
||||
dev_path,
|
||||
serial_number,
|
||||
manufacturer,
|
||||
|
|
|
@ -237,7 +237,7 @@ async def test_discovery_via_usb(detect_mock, hass):
|
|||
await hass.async_block_till_done()
|
||||
|
||||
assert result2["type"] == FlowResultType.CREATE_ENTRY
|
||||
assert "zigbee radio" in result2["title"]
|
||||
assert result2["title"] == "zigbee radio"
|
||||
assert result2["data"] == {
|
||||
"device": {
|
||||
"baudrate": 115200,
|
||||
|
@ -273,10 +273,7 @@ async def test_zigate_discovery_via_usb(detect_mock, hass):
|
|||
await hass.async_block_till_done()
|
||||
|
||||
assert result2["type"] == FlowResultType.CREATE_ENTRY
|
||||
assert (
|
||||
"zigate radio - /dev/ttyZIGBEE, s/n: 1234 - test - 6015:0403"
|
||||
in result2["title"]
|
||||
)
|
||||
assert result2["title"] == "zigate radio"
|
||||
assert result2["data"] == {
|
||||
"device": {
|
||||
"path": "/dev/ttyZIGBEE",
|
||||
|
|
Loading…
Add table
Reference in a new issue