UNPKG

node-red-contrib-home-assistant-websocket

Version:
85 lines (84 loc) 2.28 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = [ { version: 0, up: (schema) => { const newSchema = { ...schema, version: 0, }; return newSchema; }, }, { version: 1, up: (schema) => { const newSchema = { ...schema, version: 1, ha_boolean: schema.ha_boolean || 'y|yes|true|on|home|open', rejectUnauthorizedCerts: schema.rejectUnauthorizedCerts !== undefined ? schema.rejectUnauthorizedCerts : true, connectionDelay: schema.connectionDelay !== undefined ? schema.connectionDelay : true, cacheJson: schema.cacheJson !== undefined ? schema.cacheJson : true, }; return newSchema; }, }, { version: 2, up: (schema) => { const newSchema = { ...schema, version: 2, heartbeat: false, heartbeatInterval: 30, }; return newSchema; }, }, { version: 3, up: (schema) => { const newSchema = { ...schema, version: 3, areaSelector: 'friendlyName', deviceSelector: 'friendlyName', entitySelector: 'friendlyName', }; return newSchema; }, }, { version: 4, up: (schema) => { const newSchema = { ...schema, version: 4, statusSeparator: 'at: ', statusYear: 'hidden', statusMonth: 'short', statusDay: 'numeric', statusHourCycle: 'h23', statusTimeFormat: 'h:m', }; return newSchema; }, }, { version: 5, up: (schema) => { const newSchema = { ...schema, version: 5, enableGlobalContextStore: true, }; return newSchema; }, }, ];