mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-09 02:16:35 +00:00
Update state label badge for device tracker
This commit is contained in:
parent
b0b12e20e0
commit
d069489d09
@ -108,7 +108,7 @@ export default new Polymer({
|
|||||||
case 'sensor':
|
case 'sensor':
|
||||||
return state.attributes.unit_of_measurement || state.state;
|
return state.attributes.unit_of_measurement || state.state;
|
||||||
case 'device_tracker':
|
case 'device_tracker':
|
||||||
return state.state === 'home' ? 'Home' : 'Away';
|
return state.state === 'not_home' ? 'Away' : state.state;
|
||||||
default:
|
default:
|
||||||
return state.attributes.unit_of_measurement;
|
return state.attributes.unit_of_measurement;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user