Only show sliders for dimmable lamps

This commit is contained in:
thomas committed 2018-08-17 15:19:35 +02:00
1 parent d96c3033b2
commit 11fc8d1b73
1 file changed
+6
+6
View File
@@ -62,6 +62,12 @@ class SliderEntityRow extends Polymer.Element {
{
this.showTop = false;
this.showBottom = false;
if(!(this.attribute in this.stateObj.attributes)) {
if(!('supported_features' in this.stateObj.attributes) ||
!(this.stateObj.attributes['supported_features'] & 1)) {
return;
}
}
if(!(this.hideWhenOff && !this.isOn)) {
if(this.breakSlider)
this.showBottom = true;