Themes: don't show opening_hours_state title icon if seasonal is set and the item is closed due to seasonal restrictions

This commit is contained in:
Pieter Vander Vennet 2023-12-07 01:03:23 +01:00
parent 4ee83cfe5c
commit 1748e98bfc

View file

@ -77,7 +77,41 @@
"icon": {
"class": "w-20 mx-1 flex items-center"
},
"render": "{opening_hours_state()}"
"render": "{opening_hours_state()}",
"condition": {
"or": [
"seasonal=",
"seasonal=no",
{
"or": [
{
"and": [
"seasonal~.*winter.*",
"_now:date~....-(12|01|02)-.."
]
},
{
"and": [
"seasonal~.*spring.*",
"_now:date~....-(03|04|05)-.."
]
},
{
"and": [
"seasonal~.*summer.*",
"_now:date~....-(06|07|08)-.."
]
},
{
"and": [
"seasonal~.*autumn.*",
"_now:date~....-(09|10|11)-.."
]
}
]
}
]
}
},
{
"id": "phonelink",