Changed behaviour of selecting base entity. (#735)

This commit is contained in:
baflo 2018-01-07 06:49:44 +01:00 committed by Paulus Schoutsen
parent 0b9bd62251
commit ea16ebd4f0

View File

@ -73,7 +73,7 @@ class MoreInfoGroup extends Polymer.Element {
var el;
if (states && states.length > 0) {
baseStateObj = states[0];
baseStateObj = states.find(s => s.state === 'on') || states[0];
groupDomainStateObj = Object.assign({}, baseStateObj, {
entity_id: stateObj.entity_id,