Use common strings in denonavr integration (#41746)

This commit is contained in:
Gautham Varma K 2020-10-17 17:04:51 +05:30 committed by GitHub
parent 622c56b6a7
commit ee1b6d3195
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -158,7 +158,7 @@ class DenonAvrFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
self.zone3,
)
if not await connect_denonavr.async_connect_receiver():
return self.async_abort(reason="connection_error")
return self.async_abort(reason="cannot_connect")
receiver = connect_denonavr.receiver
mac_address = await self.async_get_mac(self.host)

View file

@ -17,7 +17,7 @@
"title": "Select the receiver that you wish to connect",
"description": "Run the setup again if you want to connect additional receivers",
"data": {
"select_host": "Receiver IP"
"select_host": "Receiver IP address"
}
}
},
@ -27,7 +27,7 @@
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]",
"connection_error": "Failed to connect, please try again, disconnecting mains power and ethernet cables and reconnecting them may help",
"cannot_connect": "Failed to connect, please try again, disconnecting mains power and ethernet cables and reconnecting them may help",
"not_denonavr_manufacturer": "Not a Denon AVR Network Receiver, discovered manafucturer did not match",
"not_denonavr_missing": "Not a Denon AVR Network Receiver, discovery information not complete"
}

View file

@ -389,7 +389,7 @@ async def test_config_flow_manual_host_connection_error(hass):
)
assert result["type"] == "abort"
assert result["reason"] == "connection_error"
assert result["reason"] == "cannot_connect"
async def test_config_flow_manual_host_no_device_info(hass):
@ -416,7 +416,7 @@ async def test_config_flow_manual_host_no_device_info(hass):
)
assert result["type"] == "abort"
assert result["reason"] == "connection_error"
assert result["reason"] == "cannot_connect"
async def test_config_flow_ssdp(hass):