public DateTime GetNextThermalDesinfect()
        {
            var nextTermalTime = HttpGet <int>(EndpointPaths.DHWA_THERMAL_DESINFECT_TIME_ENDPOINT_PATH);
            var nextTermalDay  = HttpGet <string>(EndpointPaths.DHWA_THERMAL_DESINFECT_WEEKDAY_ENDPOINT_PATH);

            return(nextTermalDay != null?NefitEasyUtils.GetNextDate(nextTermalDay, nextTermalTime) : new DateTime());
        }
        public IEnumerable <ProgramSwitch> GetProgram(int programNumber)
        {
            if (programNumber < 0 || programNumber >= 3)
            {
                return(null);
            }

            var program0 = HttpGet <IEnumerable <NefitProgram> >($"{EndpointPaths.USER_PROGRAM_PROGRAM_ENDPOINT_PATH}{programNumber}");

            return(!program0.Any() ? null : NefitEasyUtils.ParseProgram(program0));
        }
        public bool SetTemperature(double temperature)
        {
            if (!(temperature >= 5) || !(temperature <= 30))
            {
                return(false);
            }

            var result = HttpPut(EndpointPaths.HC1_TEMPERATURE_ROOM_MANUAL_ENDPOINT_PATH, NefitEasyUtils.GetHttpPutDataString(temperature));

            if (result)
            {
                result = HttpPut(EndpointPaths.HC1_MANUAL_TEMPERATURE_OVERRIDE_STATUS_ENDPOINT_PATH, NefitEasyUtils.GetHttpPutDataString(nameof(Switch.On)));
            }
            if (result)
            {
                result = HttpPut(EndpointPaths.HC1_MANUAL_TEMPERATURE_OVERRIDE, NefitEasyUtils.GetHttpPutDataString(temperature));
            }
            return(result);
        }
 public bool SetUserMode(UserModes newMode) => newMode != UserModes.Unknown && HttpPut(EndpointPaths.HC1_USERMODE_ENDPOINT_PATH, NefitEasyUtils.GetHttpPutDataString(newMode.ToString()));
 public bool SetHotWaterModeManualProgram(bool onOff) => HttpPut(EndpointPaths.DHWA_OPERATION_MANUAL_MODE_ENDPOINT_PATH, NefitEasyUtils.GetHttpPutDataString(onOff ? nameof(Switch.On) : nameof(Switch.Off)));
 public bool?ThermalDesinfectEnabled() => NefitEasyUtils.IsOnOrTrue(HttpGet <string>(EndpointPaths.DHWA_THERMAL_DESINFECT_STATE_ENDPOINT_PATH));
 public bool?SystemLeakingStatus() => NefitEasyUtils.IsOnOrTrue(HttpGet <string>(EndpointPaths.PM_SYSTEM_LEAKING_STATUS_ENDPOINT_PATH));
 public bool?ShortTappingStatus() => NefitEasyUtils.IsOnOrTrue(HttpGet <string>(EndpointPaths.PM_SHORT_TAPPING_STATUS_ENDPOINT_PATH));
 public bool?ClosingValveStatus() => NefitEasyUtils.IsOnOrTrue(HttpGet <string>(EndpointPaths.PM_CLOSING_VALVE_STATUS_ENDPOINT_PATH));
 public bool?RefillNeededStatus() => NefitEasyUtils.IsOnOrTrue(HttpGet <string>(EndpointPaths.PM_REFILL_NEEDED_STATUS_ENDPOINT_PATH));
 public bool?IgnitionStatus() => NefitEasyUtils.IsOnOrTrue(HttpGet <string>(EndpointPaths.PM_IGNITION_STATUS_ENDPOINT_PATH));
 public bool?PreheatingActive() => NefitEasyUtils.IsOnOrTrue(HttpGet <string>(EndpointPaths.USER_PROGRAM_PREHEATING_ENDPOINT_PATH));
 public bool?FireplaceFunctionActive() => NefitEasyUtils.IsOnOrTrue(HttpGet <string>(EndpointPaths.USER_PROGRAM_PREHEATING_ENDPOINT_PATH));