public void HomeSensorTest() { var data = HomeSensorHelper.GetSensorData(); Assert.IsNotNull(data); Assert.IsTrue(data.Temperature > 0); }
public async void Run(IBackgroundTaskInstance taskInstance) { taskInstance.Canceled += OnCanceled; var defferal = taskInstance.GetDeferral(); TileHelper.UpdateTile(HomeSensorHelper.GetSensorData()); defferal.Complete(); }
private void Refresh() { var data = HomeSensorHelper.GetSensorData(); TileHelper.UpdateTile(data); Temperature.Text = data.Temperature + "°F"; DewPoint.Text = data.DewPoint.ToString("#0.000"); Humidity.Text = string.Format("{0}%", data.Humidity.ToString("#0.00")); Light.Text = (data.Light > 190) ? "On" : "Off"; CarbonMonoxide.Text = data.CarbonMonoxide.ToString(); Smoke.Text = data.Smoke.ToString(); LastUpdated.Text = string.Format("Last Updated: {0}", DateTime.Now); }