30 lines
703 B
C#
30 lines
703 B
C#
namespace Yuna.Website.Server.Model.YandexDevice
|
|
{
|
|
public static class YandexExtensions
|
|
{
|
|
public static string ToJsonName(this YandexDeviceType type)
|
|
{
|
|
switch(type)
|
|
{
|
|
case YandexDeviceType.ClimateSensor:
|
|
return "sensor.climate";
|
|
|
|
default:
|
|
return "yuna_error";
|
|
}
|
|
}
|
|
|
|
public static string ToJsonName(this YandexPropType type)
|
|
{
|
|
switch (type)
|
|
{
|
|
case YandexPropType.Float:
|
|
return "float";
|
|
|
|
default:
|
|
return "yuna_error";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|