How to use the pysmartthings.entity.Entity.__init__ function in pysmartthings

To help you get started, we’ve selected a few pysmartthings 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 andrewsayre / pysmartthings / pysmartthings / scene.py View on Github external
def __init__(self, api: Api, data: Optional[Dict] = None):
        """Create a new instance of the class."""
        Entity.__init__(self, api)
        Scene.__init__(self)
        if data:
            self.apply_data(data)
github andrewsayre / pysmartthings / pysmartthings / room.py View on Github external
def __init__(
        self,
        api: Api,
        data: Optional[Dict] = None,
        *,
        location_id: str = None,
        room_id: str = None
    ):
        """Initialize the room."""
        Entity.__init__(self, api)
        Room.__init__(self)
        if data:
            self.apply_data(data)
        if location_id:
            self._location_id = location_id
        if room_id:
            self._room_id = room_id
github andrewsayre / pysmartthings / pysmartthings / app.py View on Github external
def __init__(self, api: Api, data=None):
        """Create a new instance of the AppEntity class."""
        Entity.__init__(self, api)
        App.__init__(self)
        if data:
            self.apply_data(data)
github andrewsayre / pysmartthings / pysmartthings / app.py View on Github external
def __init__(self, api: Api, app_id: str, data=None):
        """Create a new instance of the AppSettingEntity class."""
        Entity.__init__(self, api)
        AppSettings.__init__(self, app_id)
        if data:
            self.apply_data(data)
github andrewsayre / pysmartthings / pysmartthings / location.py View on Github external
def __init__(
        self, api: Api, data: Optional[dict] = None, location_id: Optional[str] = None
    ):
        """Create a new instance of the LocationEntity."""
        Entity.__init__(self, api)
        Location.__init__(self)
        if data:
            self.apply_data(data)
        if location_id:
            self._location_id = location_id
github andrewsayre / pysmartthings / pysmartthings / installedapp.py View on Github external
def __init__(self, api: Api, data=None, installed_app_id=None):
        """Create a new instance of the InstalledAppEntity class."""
        Entity.__init__(self, api)
        InstalledApp.__init__(self)
        if data:
            self.apply_data(data)
        if installed_app_id:
            self._installed_app_id = installed_app_id
github andrewsayre / pysmartthings / pysmartthings / app.py View on Github external
def __init__(self, api: Api, app_id: str, data=None):
        """Create a new instance of the OAuth class."""
        Entity.__init__(self, api)
        AppOAuth.__init__(self, app_id)
        if data:
            self.apply_data(data)