-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add tone,volume & duration selector to more-info dialog for sirens #22786
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
I don't think we can add it as a select because it's not persisted in the state machine, . For all other entities, the selected item is saved (presets, modes, etc...). That would lead to confusion for the user as this option is only used when turning on the siren. I let the UX team decide on this point. |
I had the same thought but couldn't think of a better UX. An input modal is weird on top of another modal and the input is not required. We could distinguish it with design somehow, I guess. |
src/dialogs/more-info/components/siren/ha-more-info-siren-advanced-controls.ts
Outdated
Show resolved
Hide resolved
src/dialogs/more-info/components/siren/ha-more-info-siren-advanced-controls.ts
Outdated
Show resolved
Hide resolved
<ha-textfield | ||
type="number" | ||
.label=${this.hass.localize("ui.components.siren.duration")} | ||
.value=${this._duration} | ||
@change=${this._handleDurationChange} | ||
></ha-textfield> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should show somewhere the unit of the time as information.
And maybe just prefil 10 seconds as default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know the unit of. It isn't documented anywhere.
Don't want to set defaults as the device will play the full duration of the tone only if no duration is set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆 ok, maybe someone else knows? I would assume seconds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know the unit of. It isn't documented anywhere. Don't want to set defaults as the device will play the full duration of the tone only if no duration is set
What do you think about adding (optional)
to the optional fields label :
- Volume (optional)
- Duration (optional)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But they are all optional
Pull request was converted to draft
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
src/dialogs/more-info/components/siren/ha-more-info-siren-advanced-controls.ts
Outdated
Show resolved
Hide resolved
src/dialogs/more-info/components/siren/ha-more-info-siren-advanced-controls.ts
Outdated
Show resolved
Hide resolved
<ha-textfield | ||
type="number" | ||
.label=${this.hass.localize("ui.components.siren.duration")} | ||
.value=${this._duration} | ||
@change=${this._handleDurationChange} | ||
></ha-textfield> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆 ok, maybe someone else knows? I would assume seconds.
The zwave mock I have has its duration in seconds and the ZHA code is written for seconds so I will assume it's in seconds. There is some deconz siren code that does |
Proposed change
Select the tone to use when manually starting the siren. Needed for zwave-js/certification-backlog#16
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: