diff options
author | ctucx <c@ctu.cx> | 2020-09-15 11:28:30 +0200 |
---|---|---|
committer | ctucx <c@ctu.cx> | 2020-09-15 11:28:30 +0200 |
commit | 4057993960872f3718c35e1cb6f3d29b8d4590a5 (patch) | |
tree | e194c83584e9af5e4221570f30326dd895d23732 /types.nim | |
parent | 10f1659d5a1299e464141974b514a0e61a72cf5c (diff) |
update
Diffstat (limited to 'types.nim')
-rw-r--r-- | types.nim | 106 |
1 files changed, 0 insertions, 106 deletions
@@ -1,106 +0,0 @@ -import options - -type - TradfriDeviceType* = enum - Remote, slaveRemote, Lightbulb, Plug, motionSensor, signalRepeater, Blind, soundRemote - - TradfriPowerSource* = enum - Unknown, internalBattery, externalBattery, Battery, POE, USB, AC, Solar - - TradfriLightSpectrum* = enum - RGB, White, None - - TradfriDeviceActionType* = enum - LightSetPowerState, LightSetBrightness, LightSetColorHex, LightSetColorXY, LightSetHueSaturation, LightSetColorTemperature, PlugSetPowerState, PlugSetDimmerValue - - - TradfriGatewayRef* = object - host*: string - port*: int - user*: string - pass*: string - - TradfriDeviceInfo* = object - manufacturer*: string - modelNumber*: string - serialNumber*: string - firmwareVersion*: string - power*: TradfriPowersource - battery*: int - - - TradfriDeviceState* = object - case kind*: TradfriDeviceType - of Remote: - remoteSupported*: bool - - of slaveRemote: - slaveRemoteSupported*: bool - - of Lightbulb: - lightPowered*: bool - lightSpectrum*: TradfriLightSpectrum - lightHue*: Option[int] - lightSaturation*: Option[int] - lightColorHex*: Option[string] - lightColorX*: Option[float] - lightColorY*: Option[float] - lightColorTemperature*: Option[int] - lightBrightness*: int - - of Plug: - plugPowered*: bool - plugDimmer*: int - - of motionSensor: - motionSensorSupported*: bool - - of signalRepeater: - signalRepeaterSupported*: bool - - of Blind: - blindPosition*: float - blindTrigger*: float - - of soundRemote: - soundRemoteSupported*: bool - - TradfriDevice* = object - gatewayRef*: TradfriGatewayRef - `type`*: TradfriDeviceType - id*: int - name*: string - alive*: bool - createdAt*: int - lastSeen*: int - info*: TradfriDeviceInfo - state*: TradfriDeviceState - - TradfriDeviceAction* = object - transitionTime*: int - case kind*: TradfriDeviceActionType - of LightSetPowerState: - lightPowerState*: bool - - of LightSetBrightness: - lightBrightness*: int - - of LightSetColorHex: - lightColorHex*: string - - of LightSetColorXY: - lightColorX*: float - lightColorY*: float - - of LightSetHueSaturation: - lightHue*: int - lightSaturation*: int - - of LightSetColorTemperature: - lightColorTemperature*: int - - of PlugSetPowerState: - plugPowerState*: bool - - of PlugSetDimmerValue: - plugDimmerValue*: int |