mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 18:56:39 +00:00
Add icons for input_datetime (#661)
This commit is contained in:
parent
2ff0be8529
commit
8d790e9601
@ -285,6 +285,9 @@ window.hassUtil.domainIcon = function (domain, state) {
|
|||||||
case 'input_boolean':
|
case 'input_boolean':
|
||||||
return 'mdi:drawing';
|
return 'mdi:drawing';
|
||||||
|
|
||||||
|
case 'input_datetime':
|
||||||
|
return 'mdi:calendar-clock';
|
||||||
|
|
||||||
case 'input_select':
|
case 'input_select':
|
||||||
return 'mdi:format-list-bulleted';
|
return 'mdi:format-list-bulleted';
|
||||||
|
|
||||||
@ -421,6 +424,12 @@ window.hassUtil.stateIcon = function (state) {
|
|||||||
return window.hassUtil.binarySensorIcon(state);
|
return window.hassUtil.binarySensorIcon(state);
|
||||||
} else if (domain === 'cover') {
|
} else if (domain === 'cover') {
|
||||||
return window.hassUtil.coverIcon(state);
|
return window.hassUtil.coverIcon(state);
|
||||||
|
} else if (domain === 'input_datetime') {
|
||||||
|
if (!state.attributes.has_date) {
|
||||||
|
return 'mdi:clock';
|
||||||
|
} else if (!state.attributes.has_time) {
|
||||||
|
return 'mdi:calendar';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return window.hassUtil.domainIcon(domain, state.state);
|
return window.hassUtil.domainIcon(domain, state.state);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user