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'm trying to make my first extension, and I can't seem to figure out how to update the text on the button when I have multiple inputs.
I've used the clock extension as a template where the following code updates the button:
this.setValue({ 'clock-12h': moment().format('h:mm A'), 'clock-24h': moment().format('HH:mm') })
this seems to work fine as long as there is one input on the button as is the case with the clock extesion:
this.inputs = [ { label: 'Display Time', value: 'clock-display-time', icon: 'clock', mode: 'custom-value', fontIcon: 'fas', color: '#1a1a1a', input: [ { label: 'Select Clock Format', type: 'input:select', items: [ { value: 'clock-12h', label: '12 Hour Format' }, { value: 'clock-24h', label: '24 Hour Format' } ] } ] } ];
Now let's say I'd like to add a parameter, e.g. the timezone for which I'd like to display the time.
timezone
this.inputs = [ { label: 'Display Time', value: 'clock-display-time', icon: 'clock', mode: 'custom-value', fontIcon: 'fas', color: '#1a1a1a', input: [ { label: 'Select Clock Format', type: 'input:select', items: [ { value: 'clock-12h', label: '12 Hour Format' }, { value: 'clock-24h', label: '24 Hour Format' } ] }, { label: 'Select Timezone', type: 'input:select', items: [ // ... List of timezones omited for brevity ] } ] } ];
how should the input for this.setValue look in this case?
this.setValue
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm trying to make my first extension, and I can't seem to figure out how to update the text on the button when I have multiple inputs.
I've used the clock extension as a template where the following code updates the button:
this seems to work fine as long as there is one input on the button as is the case with the clock extesion:
Now let's say I'd like to add a parameter, e.g. the
timezone
for which I'd like to display the time.how should the input for
this.setValue
look in this case?The text was updated successfully, but these errors were encountered: