mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-11 11:26:35 +00: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) {
|
computeIcon(state) {
|
||||||
switch (state.domain) {
|
switch (state.domain) {
|
||||||
|
case 'device_tracker':
|
||||||
|
return !state.attributes.entity_picture && domainIcon(state.domain);
|
||||||
case 'scene':
|
case 'scene':
|
||||||
case 'script':
|
case 'script':
|
||||||
return domainIcon(state.domain);
|
return domainIcon(state.domain);
|
||||||
@ -104,7 +106,7 @@ export default new Polymer({
|
|||||||
case 'script':
|
case 'script':
|
||||||
return state.domain;
|
return state.domain;
|
||||||
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 === 'home' ? 'Home' : 'Away';
|
||||||
default:
|
default:
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.badges {
|
.badges {
|
||||||
margin-top: 8px;
|
margin-top: 16px;
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user