21
issue-reports/processing.js
Normal file
21
issue-reports/processing.js
Normal file
@ -0,0 +1,21 @@
|
||||
const states = global.get('homeassistant.homeAssistant.states')
|
||||
const text = states['input_text.report_system'].state
|
||||
const type = states['input_select.report_type'].state
|
||||
const resetText = 'Type your report here'
|
||||
const resetType = 'Bug Report'
|
||||
|
||||
msg.text = text
|
||||
msg.type = type
|
||||
|
||||
msg.reset_text = resetText
|
||||
msg.reset_type = resetType
|
||||
|
||||
if (type === "New Idea") {
|
||||
node.status({fill:"green",shape:"dot",text:"New Idea"})
|
||||
} else if (type === "Bug Report") {
|
||||
node.status({fill:"green",shape:"dot",text:"Bug Report"})
|
||||
} else if (type === "Adjustment") {
|
||||
node.status({fill:"green",shape:"dot",text:"Adjustment"})
|
||||
}
|
||||
|
||||
return msg
|
Reference in New Issue
Block a user