#Conditional Dashboard Views
1 messages · Page 1 of 1 (latest)
I don't use the Visibility options myself but it looks like the options for Views are only limited to users while individual cards have a couple more options. For right now, I'm going to say the answer to your question is simply no. With that said, I wouldn't be surprised to see more options added in the future. Visibility is a relatively new feature.
On a side note, currently for cards, there's a Time option but no Date option. There is, however, an Entity state option. You could configure a input_boolean helper (show_seasonal) with a template to evaluate true/false based on your holiday criteria (month=12, for example.) The state of the helper could be used for the visibility. But, again, this is only for cards and not views.
With card-mod v4 you can use the following template with card-mod-root theme to hide the tab with CSS based on the current dashboard and month (or use any template logic you wish).
Card Mod Test:
card-mod-theme: Card Mod Test
card-mod-root: |
{% set panelUrlPath = panel.panelUrlPath if 'panelUrlPath' in panel else None %}
{% set isDec = now().month == 12 %}
{% set panelToHide = 2 %}
{% if panelUrlPath == 'dashboard-test' and not isDec %}
ha-tab-group-tab[panel="{{panelToHide}}"] {
display: none;
}
{% endif %}
See https://github.com/thomasloven/lovelace-card-mod#templates for information on what variables are available to card-mod templates.