mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-25 01:25:37 -05:00
Add initial device status service
This commit is contained in:
18
DeviceStatus/Service/Device.cs
Normal file
18
DeviceStatus/Service/Device.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace Service;
|
||||
|
||||
public class Device
|
||||
{
|
||||
public string Name { get; }
|
||||
public bool Status { get; set; }
|
||||
|
||||
public Device(string name, string statusString)
|
||||
{
|
||||
Name = name;
|
||||
Update(statusString);
|
||||
}
|
||||
|
||||
public void Update(string statusString)
|
||||
{
|
||||
Status = statusString == "1";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user