mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Simplify ZHA config entry title (#76991)
This commit is contained in:
parent
88a5b90489
commit
21ebd1f612
@ -128,7 +128,7 @@ class ZhaFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
return self.async_abort(reason="not_zha_device")
|
return self.async_abort(reason="not_zha_device")
|
||||||
|
|
||||||
self._device_path = dev_path
|
self._device_path = dev_path
|
||||||
self._title = usb.human_readable_device_name(
|
self._title = description or usb.human_readable_device_name(
|
||||||
dev_path,
|
dev_path,
|
||||||
serial_number,
|
serial_number,
|
||||||
manufacturer,
|
manufacturer,
|
||||||
|
@ -237,7 +237,7 @@ async def test_discovery_via_usb(detect_mock, hass):
|
|||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
assert result2["type"] == FlowResultType.CREATE_ENTRY
|
assert result2["type"] == FlowResultType.CREATE_ENTRY
|
||||||
assert "zigbee radio" in result2["title"]
|
assert result2["title"] == "zigbee radio"
|
||||||
assert result2["data"] == {
|
assert result2["data"] == {
|
||||||
"device": {
|
"device": {
|
||||||
"baudrate": 115200,
|
"baudrate": 115200,
|
||||||
@ -273,10 +273,7 @@ async def test_zigate_discovery_via_usb(detect_mock, hass):
|
|||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
assert result2["type"] == FlowResultType.CREATE_ENTRY
|
assert result2["type"] == FlowResultType.CREATE_ENTRY
|
||||||
assert (
|
assert result2["title"] == "zigate radio"
|
||||||
"zigate radio - /dev/ttyZIGBEE, s/n: 1234 - test - 6015:0403"
|
|
||||||
in result2["title"]
|
|
||||||
)
|
|
||||||
assert result2["data"] == {
|
assert result2["data"] == {
|
||||||
"device": {
|
"device": {
|
||||||
"path": "/dev/ttyZIGBEE",
|
"path": "/dev/ttyZIGBEE",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user