We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I need to operate a flush-mounted switch with 3 relay outputs. I changed locally and this code works. I added in out.js case 'state_l1': if (payload === 'toggle') { if (device.current_values && 'position' in device.current_values) { payload = device.current_values.position > 0 ? 'close' : 'open'; } } break; case 'state_l2': if (payload === 'toggle') { if (device.current_values && 'position' in device.current_values) { payload = device.current_values.position > 0 ? 'close' : 'open'; } } break; case 'state_l3': if (payload === 'toggle') { if (device.current_values && 'position' in device.current_values) { payload = device.current_values.position > 0 ? 'close' : 'open'; } } break; And out.html } else if ('state_l1' === value) { options = [ {'value':'on', 'label':'On'}, {'value':'off', 'label':'Off'}, {'value':'toggle', 'label':'Toggle'}, {'value':'lock', 'label':'Lock'}, {'value':'unlock', 'label':'Unlock'} ]; } else if ('state_l2' === value) { options = [ {'value':'on', 'label':'On'}, {'value':'off', 'label':'Off'}, {'value':'toggle', 'label':'Toggle'}, {'value':'lock', 'label':'Lock'}, {'value':'unlock', 'label':'Unlock'} ]; } else if ('state_l3' === value) { options = [ {'value':'on', 'label':'On'}, {'value':'off', 'label':'Off'}, {'value':'toggle', 'label':'Toggle'}, {'value':'lock', 'label':'Lock'}, {'value':'unlock', 'label':'Unlock'} ]; Can you add this to the official version?
case 'state_l1': if (payload === 'toggle') { if (device.current_values && 'position' in device.current_values) { payload = device.current_values.position > 0 ? 'close' : 'open'; } } break; case 'state_l2': if (payload === 'toggle') { if (device.current_values && 'position' in device.current_values) { payload = device.current_values.position > 0 ? 'close' : 'open'; } } break; case 'state_l3': if (payload === 'toggle') { if (device.current_values && 'position' in device.current_values) { payload = device.current_values.position > 0 ? 'close' : 'open'; } } break;
} else if ('state_l1' === value) { options = [ {'value':'on', 'label':'On'}, {'value':'off', 'label':'Off'}, {'value':'toggle', 'label':'Toggle'}, {'value':'lock', 'label':'Lock'}, {'value':'unlock', 'label':'Unlock'} ]; } else if ('state_l2' === value) { options = [ {'value':'on', 'label':'On'}, {'value':'off', 'label':'Off'}, {'value':'toggle', 'label':'Toggle'}, {'value':'lock', 'label':'Lock'}, {'value':'unlock', 'label':'Unlock'} ]; } else if ('state_l3' === value) { options = [ {'value':'on', 'label':'On'}, {'value':'off', 'label':'Off'}, {'value':'toggle', 'label':'Toggle'}, {'value':'lock', 'label':'Lock'}, {'value':'unlock', 'label':'Unlock'} ];
The text was updated successfully, but these errors were encountered:
You can add a pull request.
Sorry, something went wrong.
No branches or pull requests
I need to operate a flush-mounted switch with 3 relay outputs. I changed locally and this code works. I added in out.js
case 'state_l1': if (payload === 'toggle') { if (device.current_values && 'position' in device.current_values) { payload = device.current_values.position > 0 ? 'close' : 'open'; } } break; case 'state_l2': if (payload === 'toggle') { if (device.current_values && 'position' in device.current_values) { payload = device.current_values.position > 0 ? 'close' : 'open'; } } break; case 'state_l3': if (payload === 'toggle') { if (device.current_values && 'position' in device.current_values) { payload = device.current_values.position > 0 ? 'close' : 'open'; } } break;
And out.html
} else if ('state_l1' === value) { options = [ {'value':'on', 'label':'On'}, {'value':'off', 'label':'Off'}, {'value':'toggle', 'label':'Toggle'}, {'value':'lock', 'label':'Lock'}, {'value':'unlock', 'label':'Unlock'} ]; } else if ('state_l2' === value) { options = [ {'value':'on', 'label':'On'}, {'value':'off', 'label':'Off'}, {'value':'toggle', 'label':'Toggle'}, {'value':'lock', 'label':'Lock'}, {'value':'unlock', 'label':'Unlock'} ]; } else if ('state_l3' === value) { options = [ {'value':'on', 'label':'On'}, {'value':'off', 'label':'Off'}, {'value':'toggle', 'label':'Toggle'}, {'value':'lock', 'label':'Lock'}, {'value':'unlock', 'label':'Unlock'} ];
Can you add this to the official version?
The text was updated successfully, but these errors were encountered: