1
mirror of https://github.com/home-assistant/frontend synced 2024-10-03 06:57:32 +02:00

State label badge bug fixes

This commit is contained in:
Paulus Schoutsen 2015-08-23 17:19:16 -07:00
parent 360564758f
commit 82aca23a67
2 changed files with 4 additions and 2 deletions

View File

@ -76,6 +76,8 @@ export default new Polymer({
computeIcon(state) {
switch (state.domain) {
case 'device_tracker':
return !state.attributes.entity_picture && domainIcon(state.domain);
case 'scene':
case 'script':
return domainIcon(state.domain);
@ -104,7 +106,7 @@ export default new Polymer({
case 'script':
return state.domain;
case 'sensor':
return !state.attributes.unit_of_measurement && state.state;
return state.attributes.unit_of_measurement || state.state;
case 'device_tracker':
return state.state === 'home' ? 'Home' : 'Away';
default:

View File

@ -11,7 +11,7 @@
}
.badges {
margin-top: 8px;
margin-top: 16px;
margin-left: 8px;
font-size: 80%;
text-align: center;