@di-zed/yandex-smart-home
Version:
The Yandex Smart Home skills for the different device types.
72 lines (71 loc) • 2.17 kB
TypeScript
/**
* @author DiZed Team
* @copyright Copyright (c) DiZed Team (https://github.com/di-zed/)
*/
import { Property, PropertyParameters, PropertyState } from '../property';
/**
* Export "float" property.
* https://yandex.ru/dev/dialogs/smart-home/doc/concepts/float.html?lang=en
*
* @interface
*/
export interface FloatProperty extends Property {
/**
* Property type.
*/
readonly type: 'devices.properties.float';
/**
* The parameters object.
*/
parameters?: FloatPropertyParameters;
/**
* Property state parameters.
*/
state?: FloatPropertyState;
}
/**
* The parameters object.
* https://yandex.ru/dev/dialogs/smart-home/doc/concepts/float.html?lang=en#discovery
*
* @interface
*/
export interface FloatPropertyParameters extends PropertyParameters {
/**
* Function name for a property.
*/
instance: FloatPropertyInstance;
/**
* Function value units.
*/
unit: FloatPropertyInstanceUnit;
}
/**
* Property state parameters.
* https://yandex.ru/dev/dialogs/smart-home/doc/concepts/float.html?lang=en#state
*
* @interface
*/
export interface FloatPropertyState extends PropertyState {
/**
* Function name for a property.
*/
instance: FloatPropertyInstance;
/**
* Property value for this capability.
*/
value: number;
}
/**
* List of functions.
* https://yandex.ru/dev/dialogs/smart-home/doc/concepts/float-instance.html?lang=en
*
* @type
*/
export type FloatPropertyInstance = 'amperage' | 'battery_level' | 'co2_level' | 'food_level' | 'humidity' | 'illumination' | 'pm1_density' | 'pm2.5_density' | 'pm10_density' | 'power' | 'pressure' | 'temperature' | 'tvoc' | 'voltage' | 'water_level';
/**
* List of units.
* https://yandex.ru/dev/dialogs/smart-home/doc/concepts/float-instance.html?lang=en
*
* @type
*/
export type FloatPropertyInstanceUnit = 'unit.ampere' | 'unit.percent' | 'unit.ppm' | 'unit.illumination.lux' | 'unit.density.mcg_m3' | 'unit.watt' | 'unit.pressure.atm' | 'unit.pressure.pascal' | 'unit.pressure.bar' | 'unit.pressure.mmhg' | 'unit.temperature.celsius' | 'unit.temperature.kelvin' | 'unit.volt';