Changed: Sensor domain was wrong (Idletime and Uptime).

Added: Description for new sensors
pull/10/head
Pavel 4 years ago
parent c361b829dd
commit 6b711424e3

@ -103,6 +103,14 @@ 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. 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
### Dummy ### Dummy
This sensor spits out a random number every second. Useful for testing, maybe you'll find some other use for it. This sensor spits out a random number every second. Useful for testing, maybe you'll find some other use for it.

@ -139,6 +139,20 @@ namespace UserInterface.Views
item.ShowWindowNameInput = true; item.ShowWindowNameInput = true;
item.UpdateInterval = 5; item.UpdateInterval = 5;
break; 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.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#idletime";
item.ShowQueryInput = false;
item.ShowWindowNameInput = true;
item.UpdateInterval = 5;
break;
default: default:
item.Description = null; item.Description = null;
item.MoreInfoLink = null; item.MoreInfoLink = null;

@ -24,7 +24,7 @@ namespace hass_workstation_service.Domain.Sensors
Name = this.Name, Name = this.Name,
Unique_id = this.Id.ToString(), Unique_id = this.Id.ToString(),
Device = this.Publisher.DeviceConfigModel, Device = this.Publisher.DeviceConfigModel,
State_topic = $"homeassistant/sensor/{this.Name}/state", State_topic = $"homeassistant/sensor/{Publisher.DeviceConfigModel.Name}/{this.Name}/state",
Icon = "mdi:clock-time-three-outline", Icon = "mdi:clock-time-three-outline",
}); });
} }

@ -24,7 +24,7 @@ namespace hass_workstation_service.Domain.Sensors
Name = this.Name, Name = this.Name,
Unique_id = this.Id.ToString(), Unique_id = this.Id.ToString(),
Device = this.Publisher.DeviceConfigModel, Device = this.Publisher.DeviceConfigModel,
State_topic = $"homeassistant/sensor/{this.Name}/state", State_topic = $"homeassistant/sensor/{Publisher.DeviceConfigModel.Name}/{this.Name}/state",
Icon = "mdi:clock-time-three-outline", Icon = "mdi:clock-time-three-outline",
}); });
} }

Loading…
Cancel
Save