1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-02 08:33:31 +01:00

Update state label badge for device tracker

This commit is contained in:
Paulus Schoutsen
2015-09-09 23:06:37 -07:00
parent b0b12e20e0
commit d069489d09

View File

@@ -108,7 +108,7 @@ export default new Polymer({
case 'sensor':
return state.attributes.unit_of_measurement || state.state;
case 'device_tracker':
return state.state === 'home' ? 'Home' : 'Away';
return state.state === 'not_home' ? 'Away' : state.state;
default:
return state.attributes.unit_of_measurement;
}