mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-15 13:26:34 +00:00
Adding Type to Returns
This commit is contained in:
parent
bb4ce278b0
commit
1fcf510278
@ -13,6 +13,7 @@ import { HomeAssistant, LightEntity } from "../../../types.js";
|
||||
import { hassLocalizeLitMixin } from "../../../mixins/lit-localize-mixin";
|
||||
import { LovelaceCard, LovelaceConfig } from "../types.js";
|
||||
import { longPress } from "../common/directives/long-press-directive";
|
||||
import { TemplateResult } from "lit-html";
|
||||
|
||||
const lightConfig = {
|
||||
radius: 80,
|
||||
@ -138,7 +139,7 @@ export class HuiLightCard extends hassLocalizeLitMixin(LitElement)
|
||||
});
|
||||
}
|
||||
|
||||
private renderStyle() {
|
||||
private renderStyle(): TemplateResult {
|
||||
return html`
|
||||
${roundSliderStyle}
|
||||
<style>
|
||||
@ -268,7 +269,7 @@ export class HuiLightCard extends hassLocalizeLitMixin(LitElement)
|
||||
});
|
||||
}
|
||||
|
||||
private _computeBrightness(stateObj: LightEntity) {
|
||||
private _computeBrightness(stateObj: LightEntity): string {
|
||||
if (!stateObj.attributes.brightness) {
|
||||
return "";
|
||||
}
|
||||
@ -276,7 +277,7 @@ export class HuiLightCard extends hassLocalizeLitMixin(LitElement)
|
||||
return `brightness(${(brightness + 245) / 5}%)`;
|
||||
}
|
||||
|
||||
private _computeColor(stateObj: LightEntity) {
|
||||
private _computeColor(stateObj: LightEntity): string {
|
||||
if (!stateObj.attributes.hs_color) {
|
||||
return "";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user