1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-02-15 07:25:54 +00:00

Add dark mode payload to theme-update message

This commit is contained in:
Aidan Timson
2026-01-22 09:29:48 +00:00
parent 73a1ce90c3
commit b8b9bdc9d3
2 changed files with 9 additions and 1 deletions

View File

@@ -111,6 +111,9 @@ interface EMOutgoingMessageExoplayerStop extends EMMessage {
interface EMOutgoingMessageThemeUpdate extends EMMessage {
type: "theme-update";
payload: {
darkMode: boolean;
};
}
interface EMOutgoingMessageHaptic extends EMMessage {

View File

@@ -179,6 +179,11 @@ export default <T extends Constructor<HassBaseEl>>(superClass: T) =>
themeMeta.setAttribute("content", themeColor);
}
this.hass!.auth.external?.fireMessage({ type: "theme-update" });
this.hass!.auth.external?.fireMessage({
type: "theme-update",
payload: {
darkMode,
},
});
}
};