How to use the pytradfri.device.__init__.DeviceInfo function in pytradfri

To help you get started, we’ve selected a few pytradfri 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 ggravlingen / pytradfri / pytradfri / device / __init__.py View on Github external
def manufacturer(self):
        """Human readable manufacturer name."""
        return self.raw.get(DeviceInfo.ATTR_MANUFACTURER)
github ggravlingen / pytradfri / pytradfri / device / __init__.py View on Github external
def power_source_str(self):
        """String representation of current power source."""
        if DeviceInfo.ATTR_POWER_SOURCE not in self.raw:
            return None
        return DeviceInfo.VALUE_POWER_SOURCES.get(self.power_source, 'Unknown')
github ggravlingen / pytradfri / pytradfri / device / __init__.py View on Github external
def battery_level(self):
        """Battery in 0..100"""
        return self.raw.get(DeviceInfo.ATTR_BATTERY)
github ggravlingen / pytradfri / pytradfri / device / __init__.py View on Github external
def serial(self):
        """Serial number string."""
        return self.raw.get(DeviceInfo.ATTR_SERIAL)
github ggravlingen / pytradfri / pytradfri / device / __init__.py View on Github external
def power_source(self):
        """Power source."""
        return self.raw.get(DeviceInfo.ATTR_POWER_SOURCE)
github ggravlingen / pytradfri / pytradfri / device / __init__.py View on Github external
def firmware_version(self):
        """Current firmware version string of the device."""
        return self.raw.get(DeviceInfo.ATTR_FIRMWARE_VERSION)
github ggravlingen / pytradfri / pytradfri / device / __init__.py View on Github external
def model_number(self):
        """A model identifier string (manufactuer specified string)."""
        return self.raw.get(DeviceInfo.ATTR_MODEL_NUMBER)