Adding Type to Returns

This commit is contained in:
Zack Arnett 2018-10-29 18:11:34 -04:00
parent bb4ce278b0
commit 1fcf510278

View File

@ -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 "";
}