Remove ha-state-domain-icon

This commit is contained in:
Paulus Schoutsen 2015-11-15 00:36:15 -08:00
parent 03eddbde0a
commit e550b0cec2
2 changed files with 0 additions and 50 deletions

View File

@ -1,22 +0,0 @@
<link rel='import' href='../../../bower_components/polymer/polymer.html'>
<link rel='import' href='../../../bower_components/iron-image/iron-image.html'>
<link rel='import' href='../domain-icon.html'>
<dom-module id='ha-state-domain-icon'>
<style>
/* Color the icon if light or sun is on */
domain-icon[data-domain=light][data-state=on],
domain-icon[data-domain=switch][data-state=on],
domain-icon[data-domain=sun][data-state=above_horizon] {
color: #fff176;
}
</style>
<template>
<domain-icon id='icon'
domain='[[stateObj.domain]]' data-domain$='[[stateObj.domain]]'
state='[[stateObj.state]]' data-state$='[[stateObj.state]]'>
</domain-icon>
</template>
</dom-module>

View File

@ -1,28 +0,0 @@
import Polymer from '../../polymer';
require('./domain-icon');
export default new Polymer({
is: 'ha-state-domain-icon',
properties: {
stateObj: {
type: Object,
observer: 'updateIconColor',
},
},
/**
* Called when an attribute changes that influences the color of the icon.
*/
updateIconColor(newVal) {
// for domain light, set color of icon to light color if available
if (newVal.domain === 'light' && newVal.state === 'on' &&
newVal.attributes.rgb_color) {
this.$.icon.style.color = 'rgb(' + newVal.attributes.rgb_color.join(',') + ')';
} else {
this.$.icon.style.color = null;
}
},
});