-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
215 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
{ | ||
"functional_channel_attributes": [ | ||
"accelerationSensorEventFilterPeriod", | ||
"accelerationSensorMode", | ||
"accelerationSensorNeutralPosition", | ||
"accelerationSensorSensitivity", | ||
"accelerationSensorTriggerAngle", | ||
"accelerationSensorTriggered", | ||
"actualTemperature", | ||
"alarmContactType", | ||
"authorized", | ||
"averageIllumination", | ||
"binaryBehaviorType", | ||
"blindModeActive", | ||
"colorTemperature", | ||
"currentIllumination", | ||
"currentPowerConsumption", | ||
"dimLevel", | ||
"display", | ||
"doorHandleType", | ||
"doorLockDirection", | ||
"doorState", | ||
"energyCounter", | ||
"genericAlarmSignal", | ||
"highestIllumination", | ||
"humidity", | ||
"illumination", | ||
"impulseDuration", | ||
"leftCounter", | ||
"leftRightCounterDelta", | ||
"lowBat", | ||
"lowestIllumination", | ||
"moistureDetected", | ||
"motionBufferActive", | ||
"motionDetected", | ||
"motorState", | ||
"multiModeInputMode", | ||
"notificationSoundTypeHighToLow", | ||
"notificationSoundTypeLowToHigh", | ||
"on", | ||
"passageBlindtime", | ||
"passageDirection", | ||
"passageSensorSensitivity", | ||
"powerMainsFailure", | ||
"previousShutterLevel", | ||
"previousSlatsLevel", | ||
"primaryShadingLevel", | ||
"processing", | ||
"profileMode", | ||
"pumpFollowUpTime", | ||
"pumpLeadTime", | ||
"pumpProtectionDuration", | ||
"pumpProtectionSwitchingInterval", | ||
"raining", | ||
"rightCounter", | ||
"rssiDeviceValue", | ||
"rssiPeerValue", | ||
"saturationLevel", | ||
"secondaryShadingLevel", | ||
"selfCalibrationInProgress", | ||
"setPointTemperature", | ||
"shutterLevel", | ||
"simpleRGBColorState", | ||
"slatsLevel", | ||
"smokeDetectorAlarmType", | ||
"storm", | ||
"sunshine", | ||
"temperatureExternalDelta", | ||
"temperatureExternalOne", | ||
"temperatureExternalTwo", | ||
"temperatureOffset", | ||
"todayRainCounter", | ||
"todaySunshineDuration", | ||
"totalRainCounter", | ||
"totalSunshineDuration", | ||
"unreach", | ||
"valveActualTemperature", | ||
"valvePosition", | ||
"valveState", | ||
"vaporAmount", | ||
"waterlevelDetected", | ||
"windSpeed", | ||
"windowState", | ||
"yesterdayRainCounter", | ||
"yesterdaySunshineDuration" | ||
], | ||
"group_attributes": [ | ||
"lowBat", | ||
"unreach", | ||
"dutyCycle", | ||
"incorrectPositioned", | ||
"activeProfile", | ||
"actualTemperature", | ||
"boostDuration", | ||
"boostMode", | ||
"humidity", | ||
"partyMode", | ||
"valvePosition", | ||
"windowState", | ||
"motionDetected", | ||
"presenceDetected", | ||
"on", | ||
"triggered", | ||
"primaryShadingLevel", | ||
"secondaryShadingLevel", | ||
"shutterLevel", | ||
"slatsLevel", | ||
"moistureDetected", | ||
"waterLevelDetected", | ||
"signalAcoustic", | ||
"signalOptical", | ||
"illumination", | ||
"enabled", | ||
"ventilationLevel" | ||
], | ||
"device_attributes": [ | ||
"connectionType", | ||
"modelType", | ||
"permanentlyReachable", | ||
"externalService" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from homematicip.configuration.output_format_config import OutputFormatConfig | ||
from homematicip.model.model_components import FunctionalChannel | ||
|
||
|
||
def generate_output_functional_channel(fc: FunctionalChannel, output_format_config: OutputFormatConfig) -> str: | ||
"""Generate a string representation of a FunctionalChannel object based on the output format configuration.""" | ||
return _generate_output(fc, output_format_config.functional_channel_attributes) | ||
|
||
|
||
def generate_output_group(group, output_format_config: OutputFormatConfig) -> str: | ||
"""Generate a string representation of a Group object based on the output format configuration.""" | ||
return _generate_output(group, output_format_config.group_attributes) | ||
|
||
|
||
def generate_output_device(device, output_format_config: OutputFormatConfig) -> str: | ||
"""Generate a string representation of a Device object based on the output format configuration.""" | ||
return _generate_output(device, output_format_config.device_attributes) | ||
|
||
def _generate_output(group, attributes): | ||
outputs = [] | ||
|
||
for attrib_name in attributes: | ||
if hasattr(group, attrib_name): | ||
outputs.append(f"{attrib_name}: {getattr(group, attrib_name)}") | ||
|
||
return ", ".join(outputs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.