mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Upgrade to latest Home-Assistant-JS
This commit is contained in:
parent
c7ae0f5f90
commit
020213e682
@ -1,2 +1,2 @@
|
||||
""" DO NOT MODIFY. Auto-generated by build_frontend script """
|
||||
VERSION = "832b49fd1e3ff3bc33e55812743c3a7d"
|
||||
VERSION = "96734c763abefc639b83ea3ee2190adb"
|
||||
|
File diff suppressed because one or more lines are too long
@ -54,6 +54,9 @@
|
||||
case "configurator":
|
||||
return "settings";
|
||||
|
||||
case "conversation":
|
||||
return "av:hearing";
|
||||
|
||||
default:
|
||||
return "bookmark-outline";
|
||||
}
|
||||
|
@ -22,9 +22,9 @@
|
||||
</template>
|
||||
|
||||
<div>
|
||||
<template repeat="{{state in states}}">
|
||||
<template repeat="{{entityID in entityIDs}}">
|
||||
<div class='eventContainer'>
|
||||
<a on-click={{handleClick}}>{{state.entityId}}</a>
|
||||
<a on-click={{handleClick}}>{{entityID}}</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
Polymer(Polymer.mixin({
|
||||
cbEventClicked: null,
|
||||
states: [],
|
||||
entityIDs: [],
|
||||
|
||||
attached: function() {
|
||||
this.listenToStores(true);
|
||||
@ -46,7 +46,7 @@
|
||||
},
|
||||
|
||||
stateStoreChanged: function(stateStore) {
|
||||
this.states = stateStore.all();
|
||||
this.entityIDs = stateStore.entityIDs.toArray();
|
||||
},
|
||||
|
||||
handleClick: function(ev) {
|
||||
|
@ -48,7 +48,7 @@
|
||||
},
|
||||
|
||||
eventStoreChanged: function(eventStore) {
|
||||
this.events = eventStore.all();
|
||||
this.events = eventStore.all;
|
||||
},
|
||||
|
||||
handleClick: function(ev) {
|
||||
|
@ -22,7 +22,7 @@
|
||||
notificationStoreChanged: function(notificationStore) {
|
||||
if (notificationStore.hasNewNotifications(this.lastId)) {
|
||||
var toast = this.$.toast;
|
||||
var notification = notificationStore.getLastNotification();
|
||||
var notification = notificationStore.lastNotification;
|
||||
|
||||
this.lastId = notification.id;
|
||||
toast.text = notification.message;
|
||||
|
@ -66,7 +66,7 @@
|
||||
},
|
||||
|
||||
serviceStoreChanged: function(serviceStore) {
|
||||
this.services = serviceStore.all();
|
||||
this.services = serviceStore.all;
|
||||
},
|
||||
|
||||
serviceClicked: function(ev) {
|
||||
|
@ -42,17 +42,15 @@
|
||||
},
|
||||
|
||||
streamStoreChanged: function(streamStore) {
|
||||
this.isStreaming = streamStore.isStreaming();
|
||||
this.hasError = streamStore.hasError();
|
||||
|
||||
this.$.toggle.checked = this.isStreaming;
|
||||
this.hasError = streamStore.hasError;
|
||||
this.$.toggle.checked = this.isStreaming = streamStore.isStreaming;
|
||||
},
|
||||
|
||||
toggleChanged: function(ev) {
|
||||
if (this.isStreaming) {
|
||||
streamActions.stop();
|
||||
} else {
|
||||
streamActions.start(authStore.getAuthToken());
|
||||
streamActions.start(authStore.authToken);
|
||||
}
|
||||
},
|
||||
}, storeListenerMixIn));
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 9d0ce4e9b867ce7599969714a9c45f8d58a8463f
|
||||
Subproject commit f2dfda38a2a5e4acf428f10c443f985d8fb23248
|
@ -58,7 +58,7 @@
|
||||
},
|
||||
|
||||
syncStoreChanged: function(syncStore) {
|
||||
this.loaded = syncStore.initialLoadDone();
|
||||
this.loaded = syncStore.initialLoadDone;
|
||||
},
|
||||
}, storeListenerMixIn));
|
||||
</script>
|
||||
|
@ -172,10 +172,8 @@ Polymer(Polymer.mixin({
|
||||
},
|
||||
|
||||
streamStoreChanged: function(streamStore) {
|
||||
var state = streamStore.getState();
|
||||
|
||||
this.isStreaming = state === streamStore.STATE_CONNECTED;
|
||||
this.hasStreamError = state === streamStore.STATE_ERROR;
|
||||
this.isStreaming = streamStore.isStreaming;
|
||||
this.hasStreamError = streamStore.hasError;
|
||||
},
|
||||
|
||||
menuSelect: function(ev, detail, sender) {
|
||||
|
@ -107,12 +107,12 @@
|
||||
},
|
||||
|
||||
authStoreChanged: function(authStore) {
|
||||
this.isValidating = authStore.isValidating();
|
||||
this.isLoggedIn = authStore.isLoggedIn();
|
||||
this.isValidating = authStore.isValidating;
|
||||
this.isLoggedIn = authStore.isLoggedIn;
|
||||
this.spinnerMessage = this.isValidating ? this.MSG_VALIDATING : this.MSG_LOADING_DATA;
|
||||
|
||||
if (authStore.wasLastAttemptInvalid()) {
|
||||
this.$.passwordDecorator.error = authStore.getLastAttemptMessage();
|
||||
if (authStore.lastAttemptInvalid) {
|
||||
this.$.passwordDecorator.error = authStore.lastAttemptMessage;
|
||||
this.$.passwordDecorator.isInvalid = true;
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
||||
stateHistoryActions.fetchAll();
|
||||
}
|
||||
|
||||
this.stateHistory = stateHistoryStore.all();
|
||||
this.stateHistory = stateHistoryStore.all;
|
||||
},
|
||||
|
||||
handleRefreshClick: function() {
|
||||
|
@ -69,6 +69,8 @@
|
||||
var voiceActions = window.hass.voiceActions;
|
||||
var stateStore = window.hass.stateStore;
|
||||
|
||||
var stateGroupFilter = function(state) { return state.domain === 'group'; };
|
||||
|
||||
Polymer(Polymer.mixin({
|
||||
headerTitle: "States",
|
||||
states: [],
|
||||
@ -105,28 +107,19 @@
|
||||
},
|
||||
|
||||
syncStoreChanged: function(syncStore) {
|
||||
this.isFetching = syncStore.isFetching();
|
||||
this.isFetching = syncStore.isFetching;
|
||||
},
|
||||
|
||||
streamStoreChanged: function(streamStore) {
|
||||
this.isStreaming = streamStore.isStreaming();
|
||||
this.isStreaming = streamStore.isStreaming;
|
||||
},
|
||||
|
||||
voiceStoreChanged: function(voiceStore) {
|
||||
this.isListening = voiceStore.isListening();
|
||||
this.isTransmitting = voiceStore.isTransmitting();
|
||||
this.finalTranscript = voiceStore.getFinalTranscript();
|
||||
|
||||
var interimTranscript = voiceStore.getInterimTranscript();
|
||||
|
||||
var lengthFinal = this.finalTranscript.length;
|
||||
|
||||
// cut off finalTranscript part from beginning interimTranscript
|
||||
if (interimTranscript.slice(0, lengthFinal) === this.finalTranscript) {
|
||||
this.interimTranscript = interimTranscript.slice(lengthFinal);
|
||||
} else {
|
||||
this.interimTranscript = interimTranscript;
|
||||
}
|
||||
this.isListening = voiceStore.isListening;
|
||||
this.isTransmitting = voiceStore.isTransmitting;
|
||||
this.finalTranscript = voiceStore.finalTranscript;
|
||||
this.interimTranscript = voiceStore.interimTranscript.slice(
|
||||
this.finalTranscript.length)
|
||||
},
|
||||
|
||||
filterChanged: function() {
|
||||
@ -144,15 +137,15 @@
|
||||
},
|
||||
|
||||
refreshStates: function() {
|
||||
if (this.filter == 'group') {
|
||||
this.states = _.filter(stateStore.all(), function(state) {
|
||||
return state.domain === 'group';
|
||||
});
|
||||
var states = stateStore.all;
|
||||
|
||||
if (this.filter === 'group') {
|
||||
states = states.filter(stateGroupFilter);
|
||||
} else {
|
||||
this.states = _.filter(stateStore.all(), function(state) {
|
||||
return state.domain !== 'group';
|
||||
});
|
||||
states = states.filterNot(stateGroupFilter);
|
||||
}
|
||||
|
||||
this.states = states.toArray();
|
||||
},
|
||||
|
||||
handleRefreshClick: function() {
|
||||
|
@ -84,7 +84,7 @@
|
||||
},
|
||||
|
||||
streamStoreChanged: function(streamStore) {
|
||||
this.isStreaming = streamStore.isStreaming();
|
||||
this.isStreaming = streamStore.isStreaming;
|
||||
},
|
||||
|
||||
submitClicked: function() {
|
||||
|
@ -41,11 +41,8 @@ Polymer(Polymer.mixin({
|
||||
},
|
||||
|
||||
updateStates: function() {
|
||||
if (this.stateObj && this.stateObj.attributes.entity_id) {
|
||||
this.states = stateStore.gets(this.stateObj.attributes.entity_id);
|
||||
} else {
|
||||
this.states = [];
|
||||
}
|
||||
this.states = this.stateObj && this.stateObj.attributes.entity_id ?
|
||||
stateStore.gets(this.stateObj.attributes.entity_id).toArray() : [];
|
||||
},
|
||||
}, storeListenerMixIn));
|
||||
</script>
|
||||
|
@ -63,7 +63,7 @@
|
||||
|
||||
validateAuth: function(authToken, rememberLogin) {
|
||||
authActions.validate(authToken, {
|
||||
useStreaming: preferenceStore.useStreaming(),
|
||||
useStreaming: preferenceStore.useStreaming,
|
||||
rememberLogin: rememberLogin,
|
||||
});
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user