mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-16 13:56:35 +00:00
Fixing Gallery and updating timeout type
This commit is contained in:
parent
7178d208d3
commit
bb4ce278b0
@ -55,7 +55,9 @@ export class LightEntity extends Entity {
|
||||
|
||||
if (service === "turn_on") {
|
||||
// eslint-disable-next-line
|
||||
const { brightness, hs_color } = data;
|
||||
let { brightness, hs_color, brightness_pct } = data;
|
||||
// eslint-disable-next-line
|
||||
brightness = (255 * brightness_pct) / 100;
|
||||
this.update(
|
||||
"on",
|
||||
Object.assign(this.attributes, {
|
||||
|
@ -37,7 +37,7 @@ export class HuiLightCard extends hassLocalizeLitMixin(LitElement)
|
||||
implements LovelaceCard {
|
||||
public hass?: HomeAssistant;
|
||||
private _config?: Config;
|
||||
private _brightnessTimout?: NodeJS.Timer;
|
||||
private _brightnessTimout?: number;
|
||||
|
||||
static get properties() {
|
||||
return {
|
||||
@ -254,7 +254,7 @@ export class HuiLightCard extends hassLocalizeLitMixin(LitElement)
|
||||
}
|
||||
|
||||
private _hideBrightness() {
|
||||
this._brightnessTimout = setTimeout(() => {
|
||||
this._brightnessTimout = window.setTimeout(() => {
|
||||
this.shadowRoot!.querySelector(".brightness")!.classList.remove(
|
||||
"show_brightness"
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user