private static BlyncLightInstruction MapTempToColor(int temp)
        {
            var color = new BlyncLightColor();

            if (temp <= -5)
            {
                color = BlyncLightColor.Purple;
            }
            else if (temp >= -4 && temp <= 4)
            {
                color = BlyncLightColor.White;
            }
            else if (temp >= 5 && temp <= 12)
            {
                color = BlyncLightColor.Blue;
            }
            else if (temp >= 13 && temp <= 18)
            {
                color = BlyncLightColor.Cyan;
            }
            else if (temp >= 19 && temp <= 26)
            {
                color = BlyncLightColor.Green;
            }
            else if (temp >= 27 && temp <= 34)
            {
                color = BlyncLightColor.Yellow;
            }
            else if (temp >= 35)
            {
                color = BlyncLightColor.Red;
            }

            return(new BlyncLightInstruction(color, TimeDelay.TemperatureColor));
        }
        private IEnumerable <BlyncLightInstruction> getWarning(BlyncLightColor color)
        {
            var warningList = new List <BlyncLightInstruction>();

            for (var i = 0; i < 4; i++)
            {
                warningList.Add(new BlyncLightInstruction(BlyncLightColor.Off, TimeDelay.Off));
                warningList.Add(new BlyncLightInstruction(color, TimeDelay.Warning));
            }

            return(warningList);
        }
 public BlyncLightInstruction(BlyncLightColor color, TimeDelay displayTime)
 {
     Color       = color;
     DisplayTime = displayTime;
 }