public async Task <IPostResponse> AddSensorDs18b20ValueAsync([FromContent] SensorDs8b20 data)
        {
            try
            {
                var sensor = await Context.Instance.Connection.Table <wola.ha.common.DataModel.Sensors>().Where(w => w.SensorType == data.SensorType && w.Address.ToUpper() == data.Address.ToUpper()).FirstOrDefaultAsync();

                if (sensor == null)
                {
                    return(new PostResponse(PostResponse.ResponseStatus.Conflict, $"AddSensorDs18b20Value/{data}"));
                }

                var value = new SensorTemperatureValues
                {
                    SensorId = sensor.Id,
                    Value    = (double)data.Temperature,
                    Date     = DateTime.Now
                };


                var ret = Context.Instance.Connection.InsertAsync(value);
                return(new PostResponse(PostResponse.ResponseStatus.Created, $"AddSensorDs18b20Value/{ret}"));
            }
            catch (Exception ex)
            {
                LoggerFactory.LogException(ex);
                return(new PostResponse(PostResponse.ResponseStatus.Conflict, $"AddSensorDs18b20Value/{data}"));
            }
        }
        async Task ManageSensorValues(SerialMessage message)
        {
            ISenssor val = new SensorDs8b20();

            switch (message.SensorType)
            {
            case SensorTypeEnum.test:
                break;

            case SensorTypeEnum.Ds18B20:
                val = JsonConvert.DeserializeObject <SensorDs8b20>(message.Message);
                await WolaClient.PostItemToController <SensorDs8b20>("SensorDs18b20", (SensorDs8b20)val);

                //     WolaClient.PostItemToController<SensorTemperatureValues>("SensorTempValue", item);
                break;

            case SensorTypeEnum.Dht11:
                val = JsonConvert.DeserializeObject <SensorDht>(message.Message);
                await WolaClient.PostItemToController <SensorDht>("SensorDht22", (SensorDht)val);

                break;

            case SensorTypeEnum.Dht22:
                val = JsonConvert.DeserializeObject <SensorDht>(message.Message);
                await WolaClient.PostItemToController <SensorDht>("SensorDht22", (SensorDht)val);

                break;

            case SensorTypeEnum.BMP180:
                val = JsonConvert.DeserializeObject <SensorBmp180>(message.Message);
                await WolaClient.PostItemToController <SensorBmp180>("SensorBMP180", (SensorBmp180)val);

                break;

            case SensorTypeEnum.ACS712:

                val = JsonConvert.DeserializeObject <SensorAcs712>(message.Message);
                await WolaClient.PostItemToController <SensorAcs712>("SensorAcs712", (SensorAcs712)val);

                break;

            case SensorTypeEnum.OnOff:

                break;

            default:
                break;
            }
            Debug.WriteLine(val.ToString());
        }