コード例 #1
0
    def create_api_object(self):
        """Create a pyControl4 device object.

        This exists so the director token used is always the latest one, without needing to re-init the entire entity.
        """
        return C4Light(self.entry_data[CONF_DIRECTOR], self._idx)
コード例 #2
0
ファイル: light.py プロジェクト: dadaloop82/core
 async def async_added_to_hass(self):
     """When entity is added to hass."""
     await super().async_added_to_hass()
     self._c4_light = C4Light(self.director, self._idx)