diff --git a/UserInterface/Views/AddSensorDialog.axaml.cs b/UserInterface/Views/AddSensorDialog.axaml.cs index ae81ab4..244594e 100644 --- a/UserInterface/Views/AddSensorDialog.axaml.cs +++ b/UserInterface/Views/AddSensorDialog.axaml.cs @@ -112,7 +112,7 @@ namespace UserInterface.Views item.UpdateInterval = 5; break; case AvailableSensors.WebcamActiveSensor: - item.Description = "This sensor shows if the webcam is currently in use."; + item.Description = "This sensor shows if the webcam is currently being used."; item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#webcamactive"; item.ShowDetectionModeOptions = true; item.ShowQueryInput = false; diff --git a/hass-workstation-service/Domain/Sensors/WebcamActiveSensor.cs b/hass-workstation-service/Domain/Sensors/WebcamActiveSensor.cs index 2da9b86..65829d0 100644 --- a/hass-workstation-service/Domain/Sensors/WebcamActiveSensor.cs +++ b/hass-workstation-service/Domain/Sensors/WebcamActiveSensor.cs @@ -49,6 +49,8 @@ namespace hass_workstation_service.Domain.Sensors { VideoCapture capture = new VideoCapture(0); OutputArray image = OutputArray.Create(new Mat()); + + // capture.Read() return false if it doesn't succeed in capturing if (capture.Read(image)) { capture.Release();