From 76b7d05fd7afb37bb1021485389317ccf275c213 Mon Sep 17 00:00:00 2001 From: Stefan Roelofs Date: Sat, 27 Mar 2021 23:23:35 +0100 Subject: [PATCH] Small delay between deleting sensor and adding sensor. I think that the mqtt update works better because of this. --- hass-workstation-service/Data/ConfigurationService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/hass-workstation-service/Data/ConfigurationService.cs b/hass-workstation-service/Data/ConfigurationService.cs index 40a862a..7965764 100644 --- a/hass-workstation-service/Data/ConfigurationService.cs +++ b/hass-workstation-service/Data/ConfigurationService.cs @@ -377,6 +377,7 @@ namespace hass_workstation_service.Data public async void UpdateConfiguredSensor(Guid id, AbstractSensor sensor) { await DeleteSensor(id); + await Task.Delay(500); AddSensor(sensor); WriteSensorSettingsAsync(); }