mirror of
https://github.com/iminet/dev.git
synced 2024-12-21 21:12:39 +01:00
Improvements
This commit is contained in:
parent
0712b5431a
commit
920e9fa11e
|
@ -1,4 +1,4 @@
|
|||
using SmartThingsNet.Api;
|
||||
using SmartThingsNet.Api;
|
||||
using SmartThingsNet.Client;
|
||||
using SmartThingsNet.Model;
|
||||
|
||||
|
@ -16,9 +16,17 @@ namespace SmartThings
|
|||
var rooms = new RoomsApi(configuration);
|
||||
var devicelist = devices.GetDevices(accesstoken).Items;
|
||||
|
||||
Console.WriteLine(String.Join(Environment.NewLine, locations.ListLocations(accesstoken).Items.Select(x => x.Name)));
|
||||
Console.WriteLine(String.Join(Environment.NewLine, rooms.ListRooms(accesstoken, locations.ListLocations(accesstoken).Items.First().LocationId.ToString()).Items.Select(x => x.Name)));
|
||||
Console.WriteLine(String.Join(Environment.NewLine, devicelist.Select(x => $"{x.Label} :: {x.DeviceId}").ToList()));
|
||||
Console.WriteLine("Locations:");
|
||||
Console.WriteLine("- " + String.Join(Environment.NewLine+"- ", locations.ListLocations(accesstoken).Items.Select(x => x.Name)));
|
||||
Console.WriteLine();
|
||||
|
||||
Console.WriteLine("Rooms:");
|
||||
Console.WriteLine("- " + String.Join(Environment.NewLine+"- ", rooms.ListRooms(accesstoken, locations.ListLocations(accesstoken).Items.First().LocationId.ToString()).Items.Select(x => x.Name)));
|
||||
Console.WriteLine();
|
||||
|
||||
Console.WriteLine("Devices:");
|
||||
Console.WriteLine("- " + String.Join(Environment.NewLine+"- ", devicelist.Select(x => $"{x.Label} :: {x.DeviceId}").ToList()));
|
||||
Console.WriteLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user