MCPcopy
hub / github.com/arsaboo/homeassistant-config / get_device_config

Function get_device_config

python_scripts/shellies_discovery.py:1568–1580  ·  view source on GitHub ↗

Get device configuration.

(dev_id)

Source from the content-addressed store, hash-verified

1566
1567
1568def get_device_config(dev_id):
1569 """Get device configuration."""
1570 result = data.get(dev_id, data.get(dev_id.lower(), {})) # noqa: F821
1571 if not result:
1572 result = {}
1573 try:
1574 if len(result) > 0:
1575 result[0]
1576 except TypeError:
1577 logger.error("Wrong configuration for %s", dev_id) # noqa: F821
1578 result = {}
1579 finally:
1580 return result
1581
1582
1583def mqtt_publish(topic, payload, retain, json=False):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected