Allow customUI on 'unavailable' state too. (#357)

This commit is contained in:
Andrey 2017-07-26 12:58:32 +09:00 committed by Paulus Schoutsen
parent 19b903dfb7
commit 9fafdd4525

View File

@ -48,7 +48,7 @@ Polymer({
inputChanged: function (hass, inDialog, stateObj) {
var stateCardType;
if (!stateObj || !hass) return;
if (stateObj.state !== 'unavailable' && 'custom_ui_state_card' in stateObj.attributes) {
if (stateObj.attributes && 'custom_ui_state_card' in stateObj.attributes) {
stateCardType = stateObj.attributes.custom_ui_state_card;
this._ensureCustomUILoaded(stateCardType);
} else {