def __init__(self, iid, manufacturer): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.MANUFACTURER, CharacteristicFormats.string) self.value = manufacturer self.maxLen = 64 self.description = 'Manufacturer'
def __init__(self, iid): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.TEMPERATURE_CURRENT, CharacteristicFormats.float) self.perms = [CharacteristicPermissions.paired_read, CharacteristicPermissions.events] self.description = 'the current temperature' self.minValue = 0.0 self.maxValue = 100.0 self.minStep = 0.1 self.unit = CharacteristicUnits.celsius self.value = 23.0
def __init__(self, iid): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.ACTIVE, CharacteristicFormats.uint8) self.valid_values = {0: "Inactive", 1: "Active"} self.name = "Active" self.description = "Active" self.format = "uint8" self.perms = ['pr', 'pw', 'ev'] self.type = "000000B0-0000-1000-8000-0026BB765291"
def __init__(self, iid): AbstractCharacteristic.__init__( self, iid, CharacteristicsTypes.ADMINISTRATOR_ONLY_ACCESS, CharacteristicFormats.bool) self.perms = [ CharacteristicPermissions.paired_read, CharacteristicPermissions.paired_write, CharacteristicPermissions.events ]
def __init__(self, iid): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.AUDIO_FEEDBACK, CharacteristicFormats.bool) self.perms = [ CharacteristicPermissions.paired_read, CharacteristicPermissions.paired_write, CharacteristicPermissions.events ]
def __init__(self, iid): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.HEATING_COOLING_CURRENT, CharacteristicFormats.uint8) self.perms = [CharacteristicPermissions.paired_read, CharacteristicPermissions.events] self.description = 'Current mode of operation' self.minValue = 0 self.maxValue = 2 self.minStep = 1 self.value = 0
def __init__(self, iid): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.ON, CharacteristicFormats.bool) self.description = 'Switch state (on/off)' self.perms = [ CharacteristicPermissions.paired_write, CharacteristicPermissions.paired_read, CharacteristicPermissions.events ] self.value = False
def __init__(self, iid): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.ACTIVE_IDENTIFIER, CharacteristicFormats.uint32) self.name = "ActiveIdentifier" self.description = "ActiveIdentifier" self.format = "uint32" self.perms = ['pr', 'pw', 'ev'] self.type = "000000E7-0000-1000-8000-0026BB765291" self.minValue = 0
def __init__(self, iid): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.OUTLET_IN_USE, CharacteristicFormats.bool) self.description = 'Outlet in use' self.perms = [ CharacteristicPermissions.paired_read, CharacteristicPermissions.events ] self.value = False
def __init__(self, iid): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.BATTERY_LEVEL, CharacteristicFormats.uint8) self.perms = [ CharacteristicPermissions.paired_read, CharacteristicPermissions.events ] self.description = 'Battery level in percent' self.minValue = 0 self.maxValue = 100 self.minStep = 1 self.value = 0 self.unit = CharacteristicUnits.percentage
def __init__(self, iid): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.VOLUME, CharacteristicFormats.uint8) self.perms = [ CharacteristicPermissions.paired_read, CharacteristicPermissions.paired_write, CharacteristicPermissions.events ] self.description = 'Volume in percent' self.minValue = 0 self.maxValue = 100 self.minStep = 1 self.value = 0 self.unit = CharacteristicUnits.percentage
def __init__(self, iid): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.HUE, CharacteristicFormats.float) self.perms = [ CharacteristicPermissions.paired_read, CharacteristicPermissions.paired_write, CharacteristicPermissions.events ] self.description = 'Hue in arc degrees' self.minValue = 0 self.maxValue = 360 self.minStep = 1 self.value = 0 self.unit = CharacteristicUnits.arcdegrees
def __init__(self, iid): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.SATURATION, CharacteristicFormats.float) self.perms = [ CharacteristicPermissions.paired_read, CharacteristicPermissions.paired_write, CharacteristicPermissions.events ] self.description = 'Saturation in percent' self.minValue = 0 self.maxValue = 100 self.minStep = 1 self.value = 0 self.unit = CharacteristicUnits.percentage
def __init__(self, iid): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.BRIGHTNESS, CharacteristicFormats.int) self.perms = [ CharacteristicPermissions.paired_read, CharacteristicPermissions.paired_write, CharacteristicPermissions.events ] self.description = 'Brightness in percent' self.minValue = 0 self.maxValue = 100 self.minStep = 1 self.value = 0 self.unit = CharacteristicUnits.percentage
def __init__(self, iid, name): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.NAME, CharacteristicFormats.string) self.value = name self.maxLen = 64 self.description = 'Name'
def __init__(self, iid: int, characteristic_type: str, characteristic_format: str): AbstractCharacteristic.__init__(self, iid, characteristic_type, characteristic_format)
def __init__(self, iid, number): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.SERIAL_NUMBER, CharacteristicFormats.string) self.value = number self.maxLen = 64 self.description = 'Serial Number'
def __init__(self, iid): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.IDENTIFY, CharacteristicFormats.bool) self.perms = [CharacteristicPermissions.paired_write] self.description = 'Identify'
def __init__(self, iid, revision): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.HARDWARE_REVISION, CharacteristicFormats.string) self.value = revision self.description = 'Hardware Revision'
def __init__(self, iid, model): AbstractCharacteristic.__init__(self, iid, CharacteristicsTypes.MODEL, CharacteristicFormats.string) self.value = model self.maxLen = 64 self.description = 'Model'