one of the options in the old CH was to use the user agent of the active browser and show tabs depending on that user agent. because of that we could do:
show_tabs: >-
{%- if 'Chrome' in userAgent -%}0 to 7
{%- else -%}0 to 6
{%- endif -%}
8th tab being Cast in this case…
I believe I checked all current available options in card_mod/browser_mod and what have you, but cant find a true replacement.
I did manage to do this:
/* only show when on Chrome (a bit of a hack since we dont have 'this.device_id' */
paper-tab[aria-label='Cast'] {
{% set device = 'sensor.browser_mod_chrome' %}
{% if states(device) in ['unavailable','unknown'] or
is_state_attr(device,'visibility','hidden') %} display: none
{% elif not is_state_attr(device,'path','/ui-develop/cast') %} color: blue
{% else %} color: red
{% endif %};
}
so the tab only show when my Chrome browser is active (and colorizes when on the tab or not) and this comes close, but it still makes the tab available on all other browser windows not Chrome.
please have a look if this can be fixed/improved upon?
thanks
btw, ofc I do have set
type: entities
title: Cast Control
entities:
- type: cast
name: Home
view: home
icon: mdi:home
hide_if_unavailable: true
for all castable views and that indeed hides them when not on Chrome, but the view itself remains (albeit empty in that case)