Changed description and merge conflict

pull/10/head
Pavel 4 years ago
commit ab24dee3f3

@ -103,14 +103,13 @@ which results in `4008` for my PC.
You can use [WMI Explorer](https://github.com/vinaypamnani/wmie2/tree/v2.0.0.2) to find see what data is available.
### UpTime
This sensor returns the up time from windows in seconds
### IdleTime
This sensor returns the idle time from windows in seconds
This sensor returns the amount of seconds the workstation has been idle for. It starts counting the moment you stop typing or moving your mouse.
### UpTime
This sensor returns the up time from windows in seconds
### Dummy
This sensor spits out a random number every second. Useful for testing, maybe you'll find some other use for it.

@ -139,21 +139,20 @@ namespace UserInterface.Views
item.ShowWindowNameInput = true;
item.UpdateInterval = 5;
break;
case AvailableSensors.UpTimeSensor:
item.Description = "This sensor returns the up time from windows in seconds";
item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#uptime";
item.ShowQueryInput = false;
item.ShowWindowNameInput = true;
item.UpdateInterval = 5;
break;
case AvailableSensors.IdleTimeSensor:
item.Description = "This sensor returns the idle time in seconds";
item.Description = "This sensor returns the amount of seconds the workstation has been idle for. ";
item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#idletime";
item.ShowQueryInput = false;
item.ShowWindowNameInput = true;
item.ShowWindowNameInput = false;
item.UpdateInterval = 5;
break;
default:
case AvailableSensors.UpTimeSensor:
item.Description = "This sensor returns the up time from windows in seconds";
item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#uptime";
item.ShowQueryInput = false;
item.ShowWindowNameInput = false;
item.UpdateInterval = 5;
break; default:
item.Description = null;
item.MoreInfoLink = null;
item.ShowQueryInput = false;

@ -1,21 +1,13 @@
using hass_workstation_service.Communication;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using HWND = System.IntPtr;
namespace hass_workstation_service.Domain.Sensors
{
public class IdleTimeSensor : AbstractSensor
{
public IdleTimeSensor(MqttPublisher publisher, int? updateInterval = 10, string name = "IdleTime", Guid id = default) : base(publisher, name ?? "IdleTime", updateInterval ?? 10, id)
{
}
public IdleTimeSensor(MqttPublisher publisher, int? updateInterval = 10, string name = "IdleTime", Guid id = default) : base(publisher, name ?? "IdleTime", updateInterval ?? 10, id){}
public override AutoDiscoveryConfigModel GetAutoDiscoveryConfig()
{
@ -31,7 +23,6 @@ namespace hass_workstation_service.Domain.Sensors
public override string GetState()
{
return GetLastInputTime().ToString();
}

Loading…
Cancel
Save