mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-16 22:06:34 +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") {
|
if (service === "turn_on") {
|
||||||
// eslint-disable-next-line
|
// 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(
|
this.update(
|
||||||
"on",
|
"on",
|
||||||
Object.assign(this.attributes, {
|
Object.assign(this.attributes, {
|
||||||
|
@ -37,7 +37,7 @@ export class HuiLightCard extends hassLocalizeLitMixin(LitElement)
|
|||||||
implements LovelaceCard {
|
implements LovelaceCard {
|
||||||
public hass?: HomeAssistant;
|
public hass?: HomeAssistant;
|
||||||
private _config?: Config;
|
private _config?: Config;
|
||||||
private _brightnessTimout?: NodeJS.Timer;
|
private _brightnessTimout?: number;
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
return {
|
return {
|
||||||
@ -254,7 +254,7 @@ export class HuiLightCard extends hassLocalizeLitMixin(LitElement)
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _hideBrightness() {
|
private _hideBrightness() {
|
||||||
this._brightnessTimout = setTimeout(() => {
|
this._brightnessTimout = window.setTimeout(() => {
|
||||||
this.shadowRoot!.querySelector(".brightness")!.classList.remove(
|
this.shadowRoot!.querySelector(".brightness")!.classList.remove(
|
||||||
"show_brightness"
|
"show_brightness"
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user