Update MPD Player to use HOST and PORT to detect duplicate configs (#123410)

* Allow Monetary device_class to accept `Measurement` state_class

* Update MPD Player to use HOST and PORT to detect duplicate configs
This commit is contained in:
Carlos Gustavo Sarmiento 2024-08-11 11:50:11 -05:00 committed by GitHub
parent be3e720c57
commit b392d61391
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,7 +32,9 @@ class MPDConfigFlow(ConfigFlow, domain=DOMAIN):
"""Handle a flow initiated by the user."""
errors = {}
if user_input:
self._async_abort_entries_match({CONF_HOST: user_input[CONF_HOST]})
self._async_abort_entries_match(
{CONF_HOST: user_input[CONF_HOST], CONF_PORT: user_input[CONF_PORT]}
)
client = MPDClient()
client.timeout = 30
client.idletimeout = 10