homebridge-virtual-accessories
Version:
Virtual HomeKit accessories for Homebridge.
31 lines • 1.06 kB
JavaScript
/* eslint-disable curly */
import { Utils } from '../../utils/utils.js';
/**
*
*/
export class IkeaMatterStockTriggerConfiguration {
country;
storeLocation;
itemName;
isDisabled = false;
errorFields = [];
fieldNames = Utils.proxiedPropertiesOf(this);
isValid(prefix) {
const isValidCountry = (Utils.required(this.country));
const isValidStoreLocation = (Utils.required(this.storeLocation));
const isValidItemName = (Utils.required(this.itemName));
if (!isValidCountry)
this.errorFields.push(prefix + '.' + this.fieldNames.country);
if (!isValidStoreLocation)
this.errorFields.push(prefix + '.' + this.fieldNames.storeLocation);
if (!isValidItemName)
this.errorFields.push(prefix + '.' + this.fieldNames.itemName);
return [
(isValidCountry &&
isValidStoreLocation &&
isValidItemName),
this.errorFields,
];
}
}
//# sourceMappingURL=configurationIkeaMatterStockTrigger.js.map