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:
parent
360564758f
commit
82aca23a67
@ -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:
|
||||
|
@ -11,7 +11,7 @@
|
||||
}
|
||||
|
||||
.badges {
|
||||
margin-top: 8px;
|
||||
margin-top: 16px;
|
||||
margin-left: 8px;
|
||||
font-size: 80%;
|
||||
text-align: center;
|
||||
|
Loading…
Reference in New Issue
Block a user