Update device action button variant based on warning class (#26848)

This commit is contained in:
Wendelin 2025-09-03 09:06:18 +02:00 committed by GitHub
parent e60f9e326b
commit d982f042fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -773,6 +773,11 @@ export class HaConfigDevicePage extends LitElement {
appearance="plain"
target=${ifDefined(firstDeviceAction!.target)}
class=${ifDefined(firstDeviceAction!.classes)}
.variant=${firstDeviceAction!.classes?.includes(
"warning"
)
? "danger"
: "brand"}
.action=${firstDeviceAction!.action}
@click=${this._deviceActionClicked}
>