コード例 #1
0
 private bool IsIgnored(LoxoneUuid uuid, LoxAppModel.ControlModel controlModel)
 {
     if (this.loxoneConfig.IgnoreControls.Contains(uuid.ToString()))
     {
         return(true);
     }
     if (this.loxoneConfig.IgnoreCategories.Contains(controlModel.Cat.ToString()))
     {
         return(true);
     }
     return(false);
 }
コード例 #2
0
        private string TranslateToLoxoneOperation(LoxoneMessage.ControlSwitch.DesiredStateType desiredState, LoxoneUuid uuid)
        {
            switch (desiredState)
            {
            case LoxoneMessage.ControlSwitch.DesiredStateType.On:
                return("On");

            case LoxoneMessage.ControlSwitch.DesiredStateType.Off:
                return("Off");

            case LoxoneMessage.ControlSwitch.DesiredStateType.ByUuid:
                return(uuid.ToString());
            }
            string errMsg = $"DesiredStatte '{desiredState}' could not be translated";

            throw new Exception(errMsg);
        }