mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Small code cleanup for Shelly (#50270)
This commit is contained in:
parent
a32dc56153
commit
c85f70b639
@ -192,7 +192,6 @@ def get_device_wrapper(hass: HomeAssistant, device_id: str):
|
|||||||
async def get_coap_context(hass):
|
async def get_coap_context(hass):
|
||||||
"""Get CoAP context to be used in all Shelly devices."""
|
"""Get CoAP context to be used in all Shelly devices."""
|
||||||
context = aioshelly.COAP()
|
context = aioshelly.COAP()
|
||||||
port = DEFAULT_COAP_PORT
|
|
||||||
if DOMAIN in hass.data:
|
if DOMAIN in hass.data:
|
||||||
port = hass.data[DOMAIN].get(CONF_COAP_PORT, DEFAULT_COAP_PORT)
|
port = hass.data[DOMAIN].get(CONF_COAP_PORT, DEFAULT_COAP_PORT)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user