Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added thermostatTemperatureSetpointHigh and ...Low to Metadadata UI list #721

Merged
merged 2 commits into from
Dec 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 28 additions & 21 deletions bundles/org.openhab.ui/web/src/assets/definitions/metadata/ga.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,38 @@ const p = (type, name, label, description, options, advanced) => {
}
}

const tfaAckParameter = p('BOOLEAN', 'tfaAck', 'TFA Ack Needed')
const tfaPinParameter = p('TEXT', 'tfaPin', 'TFA Pin')
const tfaAckParameter = p('BOOLEAN', 'tfaAck', 'Two-Factor-Authentication Ack Needed')
const tfaPinParameter = p('TEXT', 'tfaPin', 'Two-Factor-Authentication Pin')
const nameParameter = p('TEXT', 'name', 'Name', 'Custom name (use of the synonyms is preferred)', null, true)
const roomHintParameter = p('TEXT', 'roomHint', 'Room Hint', null, null, true)
const roomHintParameter = p('TEXT', 'roomHint', 'Room Hint', 'Suggested name for the room where this device is installed', null, true)
const structureHintParameter = p('TEXT', 'structureHint', 'Structure Hint', 'Suggested name for the structure where this device is installed', null, true)
const invertedParameter = p('BOOLEAN', 'inverted', 'Inverted')
const speedParameter = p('TEXT', 'speed', 'Speed', 'Mappings between items states and Google modes')
const speedParameter = p('TEXT', 'speeds', 'Speeds', 'Mappings between items states and Google modes (comma separated), e.g. "0=away:zero,50=default:standard:one,100=high:two"')
const langParameter = p('TEXT', 'lang', 'Language', 'Language used for parsing text in the other parameters, e.g. "en"')
const orderedParameter = p('BOOLEAN', 'ordered', 'Ordered')
const useFahrenheitParameter = p('BOOLEAN', 'useFahrenheit', 'Use Fahrenheit')
const thermostatModesParameter = p('TEXT', 'modes', 'Thermostat Modes', 'Mappings between items states and Google modes')
const thermostatModesParameter = p('TEXT', 'modes', 'Thermostat Modes', 'Mappings between items states and Google modes (comma separated), e.g. "off=OFF:WINDOW_OPEN,heat=COMFORT:BOOST,eco=ECO,on=ON,auto"')
const thermostatTemperatureRangeParameter = p('TEXT', 'thermostatTemperatureRange', 'Temperature Range', 'The temperature range your thermostat supports (comma separated), e.g. "10,30"')
const protocolsParameter = p('TEXT', 'protocols', 'Protocols', 'List of supported protocols (comma separated), e.g. "hls,dash,smooth_stream,progressive_mp4"')
const tokenNeededParameter = p('BOOLEAN', 'token', 'Authentification Token Needed')

const classes = {
'Light': [],
'Switch': [],
'Outlet': [],
'CoffeeMaker': [],
'WaterHeater': [],
'Fireplace': [],
'Valve': [],
'Sprinkler': [],
'Vacuum': [],
'Switch': [ invertedParameter ],
'Outlet': [ invertedParameter ],
'Coffee_Maker': [ invertedParameter ],
'WaterHeater': [ invertedParameter ],
'Fireplace': [ invertedParameter ],
'Valve': [ invertedParameter ],
'Sprinkler': [ invertedParameter ],
'Vacuum': [ invertedParameter ],
'Scene': [],
'Lock': [],
'SecuritySystem': [],
'Lock': [ invertedParameter ],
'SecuritySystem': [ invertedParameter ],
'Speaker': [],
'Fan': [ speedParameter, orderedParameter ],
'Hood': [ speedParameter, orderedParameter ],
'AirPurifier': [ speedParameter, orderedParameter ],
'Fan': [ speedParameter, langParameter, orderedParameter ],
'Hood': [ speedParameter, langParameter, orderedParameter ],
'AirPurifier': [ speedParameter, langParameter, orderedParameter ],
'Awning': [ invertedParameter ],
'Blinds': [ invertedParameter ],
'Curtain': [ invertedParameter ],
Expand All @@ -49,16 +54,18 @@ const classes = {
'Pergola': [ invertedParameter ],
'Shutter': [ invertedParameter ],
'Window': [ invertedParameter ],
'Thermostat': [ useFahrenheitParameter, thermostatModesParameter ],
'Thermostat': [ useFahrenheitParameter, thermostatModesParameter, thermostatTemperatureRangeParameter ],
'thermostatTemperatureAmbient': [],
'thermostatHumidityAmbient': [],
'thermostatTemperatureSetpoint': [],
'thermostatTemperatureSetpointHigh': [],
'thermostatTemperatureSetpointLow': [],
'thermostatMode': [],
'Camera': []
'Camera': [ protocolsParameter, tokenNeededParameter ]
}

for (let c in classes) {
classes[c] = [...classes[c], tfaAckParameter, tfaPinParameter, nameParameter, roomHintParameter]
classes[c] = [...classes[c], tfaAckParameter, tfaPinParameter, nameParameter, roomHintParameter, structureHintParameter]
}

export default classes