mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
state-badge no longer sets url(undefined) as background-image
This commit is contained in:
parent
bb23f57f96
commit
c489c68f02
@ -1,2 +1,2 @@
|
||||
""" DO NOT MODIFY. Auto-generated by build_frontend script """
|
||||
VERSION = "78833990f9ec3b3b56f233320ede7f89"
|
||||
VERSION = "52df22ae159b45a14b265b26a6f4ff55"
|
||||
|
@ -17812,7 +17812,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
<div horizontal="" layout="" center="">
|
||||
<domain-icon id="icon" domain="{{stateObj.domain}}" state="{{stateObj.state}}">
|
||||
</domain-icon>
|
||||
<div fit="" id="picture" style="{{'background-image: url('+stateObj.attributes.entity_picture+')'}}"></div>
|
||||
<div fit="" id="picture"></div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
@ -17839,6 +17839,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
}
|
||||
},
|
||||
|
||||
entityPictureChanged: function(oldVal, newVal) {
|
||||
if(newVal) {
|
||||
this.$.picture.style.backgroundImage = 'url(' + newVal + ')';
|
||||
} else {
|
||||
this.$.picture.style.backgroundImage = null;
|
||||
}
|
||||
},
|
||||
|
||||
// from http://stackoverflow.com/questions/22894498/philips-hue-convert-xy-from-api-to-hex-or-rgb
|
||||
xyBriToRgb: function (x, y, bri) {
|
||||
z = 1.0 - x - y;
|
||||
|
@ -39,8 +39,7 @@
|
||||
<domain-icon id="icon"
|
||||
domain="{{stateObj.domain}}" state="{{stateObj.state}}">
|
||||
</domain-icon>
|
||||
<div fit id="picture"
|
||||
style="{{'background-image: url('+stateObj.attributes.entity_picture+')'}}"></div>
|
||||
<div fit id="picture"></div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
@ -67,6 +66,14 @@
|
||||
}
|
||||
},
|
||||
|
||||
entityPictureChanged: function(oldVal, newVal) {
|
||||
if(newVal) {
|
||||
this.$.picture.style.backgroundImage = 'url(' + newVal + ')';
|
||||
} else {
|
||||
this.$.picture.style.backgroundImage = null;
|
||||
}
|
||||
},
|
||||
|
||||
// from http://stackoverflow.com/questions/22894498/philips-hue-convert-xy-from-api-to-hex-or-rgb
|
||||
xyBriToRgb: function (x, y, bri) {
|
||||
z = 1.0 - x - y;
|
||||
|
Loading…
x
Reference in New Issue
Block a user