mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-13 12:26:35 +00:00
Remember service data per service and not globally. (#226)
This commit is contained in:
parent
c21187dc4f
commit
354423387e
@ -79,7 +79,7 @@
|
||||
data='{{service}}'>
|
||||
</app-localstorage-document>
|
||||
<app-localstorage-document
|
||||
key='panel-dev-service-state-servicedata'
|
||||
key='[[computeServicedataKey(domain, service)]]'
|
||||
data='{{serviceData}}'>
|
||||
</app-localstorage-document>
|
||||
|
||||
@ -207,6 +207,13 @@ Polymer({
|
||||
return Object.keys(serviceDomains[domain]).sort();
|
||||
},
|
||||
|
||||
computeServicedataKey: function (domain, service) {
|
||||
if (!domain || !service) {
|
||||
return 'panel-dev-service-state-servicedata';
|
||||
}
|
||||
return 'panel-dev-service-state-servicedata.' + domain + '.' + service;
|
||||
},
|
||||
|
||||
domainChanged: function () {
|
||||
this.service = '';
|
||||
this.serviceData = '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user