mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
UTC bugfix for more-info-sun
This commit is contained in:
parent
3720333927
commit
10a5db7924
@ -1,2 +1,2 @@
|
||||
""" DO NOT MODIFY. Auto-generated by build_frontend script """
|
||||
VERSION = "37514744ac03f1d764a70b8e6a7e572f"
|
||||
VERSION = "fdfcc1c10ff8713976c482931769a8e6"
|
||||
|
File diff suppressed because one or more lines are too long
@ -11,38 +11,43 @@
|
||||
|
||||
<div layout justified horizontal class='data-entry' id='rising'>
|
||||
<div class='key'>
|
||||
Rising <relative-ha-datetime datetime="{{stateObj.attributes.next_rising}}"></relative-ha-datetime>
|
||||
Rising <relative-ha-datetime datetimeObj="{{rising}}"></relative-ha-datetime>
|
||||
</div>
|
||||
<div class='value'>
|
||||
{{stateObj.attributes.next_rising | HATimeStripDate}}
|
||||
{{rising | formatTime}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div layout justified horizontal class='data-entry' id='setting'>
|
||||
<div class='key'>
|
||||
Setting <relative-ha-datetime datetime="{{stateObj.attributes.next_setting}}"></relative-ha-datetime>
|
||||
Setting <relative-ha-datetime datetimeObj="{{setting}}"></relative-ha-datetime>
|
||||
</div>
|
||||
<div class='value'>
|
||||
{{stateObj.attributes.next_setting | HATimeStripDate}}
|
||||
{{setting | formatTime}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
(function() {
|
||||
var parseDateTime = window.hass.util.parseDateTime;
|
||||
|
||||
Polymer({
|
||||
stateObjChanged: function() {
|
||||
var rising = parseDateTime(this.stateObj.attributes.next_rising);
|
||||
var setting = parseDateTime(this.stateObj.attributes.next_setting);
|
||||
rising: null,
|
||||
setting: null,
|
||||
|
||||
if(rising > setting) {
|
||||
stateObjChanged: function() {
|
||||
this.rising = parseDateTime(this.stateObj.attributes.next_rising);
|
||||
this.setting = parseDateTime(this.stateObj.attributes.next_setting);
|
||||
|
||||
if(self.rising > self.setting) {
|
||||
this.$.sunData.appendChild(this.$.rising);
|
||||
} else {
|
||||
this.$.sunData.appendChild(this.$.setting);
|
||||
}
|
||||
}
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
</polymer-element>
|
||||
|
Loading…
x
Reference in New Issue
Block a user