mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-10 19:06:36 +00:00
unavailable displayed on state label badge (#55)
This commit is contained in:
parent
40027eaac6
commit
185a8c0c9f
@ -69,6 +69,9 @@ export default new Polymer({
|
|||||||
},
|
},
|
||||||
|
|
||||||
computeIcon(state) {
|
computeIcon(state) {
|
||||||
|
if (state.state === 'unavailable') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
switch (state.domain) {
|
switch (state.domain) {
|
||||||
case 'alarm_control_panel':
|
case 'alarm_control_panel':
|
||||||
if (state.state === 'pending') {
|
if (state.state === 'pending') {
|
||||||
@ -99,6 +102,9 @@ export default new Polymer({
|
|||||||
},
|
},
|
||||||
|
|
||||||
computeLabel(state) {
|
computeLabel(state) {
|
||||||
|
if (state.state === 'unavailable') {
|
||||||
|
return 'unavai';
|
||||||
|
}
|
||||||
switch (state.domain) {
|
switch (state.domain) {
|
||||||
case 'scene':
|
case 'scene':
|
||||||
case 'script':
|
case 'script':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user