How to use the pydeconz.config.DeconzConfig function in pydeconz

To help you get started, we’ve selected a few pydeconz examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Kane610 / deconz / tests / test_config.py View on Github external
async def test_create_config():
    """Verify that creating a config works."""
    config = DeconzConfig(FIXTURE_CONFIG)

    assert config.apiversion == "1.0.4"
    assert config.bridgeid == "0123456789ABCDEF"
    assert config.linkbutton is False
    assert config.mac == "00:11:22:33:44:55"
    assert config.modelid == "deCONZ"
    assert config.name == "deCONZ-GW"
    assert config.networkopenduration == 60
    assert config.panid == 50436
    assert config.swversion == "2.4.82"
    assert config.uuid == "12345678-90AB-CDEF-1234-1234567890AB"
    assert config.websocketport == 443
    assert config.zigbeechannel == 11
github Kane610 / deconz / pydeconz / gateway.py View on Github external
async def initialize(self) -> None:
        """Load deCONZ parameters"""
        data = await self.request("get")

        self.config = DeconzConfig(data["config"])

        self.groups = Groups(data["groups"], self.request)
        self.lights = Lights(data["lights"], self.request)
        self.sensors = Sensors(data["sensors"], self.request)

        self.update_group_color(self.lights.keys())
        self.update_scenes()