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 { hassLocalizeLitMixin } from "../../../mixins/lit-localize-mixin";
import { LovelaceCard, LovelaceConfig } from "../types.js"; import { LovelaceCard, LovelaceConfig } from "../types.js";
import { longPress } from "../common/directives/long-press-directive"; import { longPress } from "../common/directives/long-press-directive";
import { TemplateResult } from "lit-html";
const lightConfig = { const lightConfig = {
radius: 80, radius: 80,
@ -138,7 +139,7 @@ export class HuiLightCard extends hassLocalizeLitMixin(LitElement)
}); });
} }
private renderStyle() { private renderStyle(): TemplateResult {
return html` return html`
${roundSliderStyle} ${roundSliderStyle}
<style> <style>
@ -268,7 +269,7 @@ export class HuiLightCard extends hassLocalizeLitMixin(LitElement)
}); });
} }
private _computeBrightness(stateObj: LightEntity) { private _computeBrightness(stateObj: LightEntity): string {
if (!stateObj.attributes.brightness) { if (!stateObj.attributes.brightness) {
return ""; return "";
} }
@ -276,7 +277,7 @@ export class HuiLightCard extends hassLocalizeLitMixin(LitElement)
return `brightness(${(brightness + 245) / 5}%)`; return `brightness(${(brightness + 245) / 5}%)`;
} }
private _computeColor(stateObj: LightEntity) { private _computeColor(stateObj: LightEntity): string {
if (!stateObj.attributes.hs_color) { if (!stateObj.attributes.hs_color) {
return ""; return "";
} }