I’m not sure if it’s something I’m doing wrong or a bug but…
If I try to use “hide_tabs:” by name conditionally based on the states of other entities and using a tab with two words in the name it doesn’t hide the tab.
To clarify:
this works perfectly and hides the “Garage” tab if the boolean is off:
hide_tabs: >-
{{ 'Alerts, ' if states.sensor.nws_alerts_are_active.state == "off" and states.input_boolean.show_nws_test_alerts_view.state == "off" else '' }}
{{ 'Tank, ' if states.input_boolean.show_tank_view.state == "off" else '' }}
{{ 'Garage, ' if states.input_boolean.show_garage_power_view.state == "off" else '' }}
But this doesn’t:
hide_tabs: >-
{{ 'Alerts, ' if states.sensor.nws_alerts_are_active.state == "off" and states.input_boolean.show_nws_test_alerts_view.state == "off" else '' }}
{{ 'Tank, ' if states.input_boolean.show_tank_view.state == "off" else '' }}
{{ 'Garage Power, ' if states.input_boolean.show_garage_power_view.state == "off" else '' }}
Hi everyone,
this might sound like a rookie question but I am having issues with Custom Header and I have been scratching my head and can’t figure it out. So apologize it might be a stupid one but I hope you will tell me what I am doing wrong.
To put a bit of background, running the last version of HACS, Custom Header and HASS. All fine up to here.
I then wanted to add a dual gauge card for my solar production as I have two inverters and it seems the only way to do it is to switch to yaml mode.
So I set the yaml option in my configuration.yaml, created the ui-lovelace.yaml file and copied the raw config inside and rebooted and that’s where the issues started.
In “non yaml mode”, where I can edit the UI from the top right corner, I have set the header to be compact mode.
After a reboot, no matter what I set as option, they never apply. Set the switch to hide the help but it doesn’t get removed. However I am able to create my dual gauge card.
Here is a part of my config files in case something would jump out from it. Tried all I could but I don’t get it.
One more silly question while I am at it Do you have to put the ressources url & type in both config files or just in the ui-lovelace one ? Don’t know where I have been reading this, but lovelace now is built in in HASS. Do you still have to switch to yaml mode ?
@seb1410 If you’re using storage mode ( “non yaml mode” ) the ui-lovelace.yaml file is no longer used and Lovelace resources are edited by going to the sidebar and navigating to Configuration > Lovelace Dashboards > Resources.
@mayker, Thanks just figured that out Reverted back to storage mode (thanks for the term) and now using the Raw Editor or shoudl I say fighting with the editor in structuring the text. I am Mr Bad indentation for the moment.
Sorry if this has been answered before, I have tried to search without any luck. I am using custom header to hide the menu and tabs etc for a certain dashboard that I use on a “read only” pad to display some info. This obviously removes the option to refresh when I change the layout of that dashboard.
I know I can just use “disable_ch” in the browser, but is there something similar to do when using the android app?
Or is there some way to click a link to force a refresh (basically do just what the “refresh” menu entry does) - that also works when using the app?
Yeah. I saw that. It just look like an overly complex solution to a pretty trivial thing. Fortunately most of the time, the little “the front end has changed, click here to reload” popup shows up. But not always, for some reason.
I am trying to uninstall Custom Header as I am trying to debug my system.
I have tried
Nothing Happens…?
mayker
(maykar (pronounced "maker" with a southern accent))
951
@Olen I don’t think it would be that difficult. Haven’t tried it myself, but I imagine this would work: Just install browser_mod and then make a button that calls the lovelace_reload service.
@MarkB1 HACS should automatically remove both the files and the resources reference when uninstalling. Try refreshing while ignoring cache with CTRL+SHIFT+R. If custom header is still active you can remove it’s resource by going to the sidebar and navigating to Configuration > Lovelace Dashboards > Resources. If HACS isn’t uninstalling, check your logs and maybe ask in the HACS thread or make an issue on the HACS repository.
@mayker Is it possible to substitute the reload default button with a custom button-card which calls the browser_mode.lovelace_reload service ?
If yes, can you give me an example?
mayker
(maykar (pronounced "maker" with a southern accent))
954
it would be exactly the same only replacing the type to be custom button card
Yes, but i meant to replace the reload menu inside custom header. Is it possible to set the button card in place of that entry?
Actually i have * hide_refresh: false* and in this way i have the reload option. I’d like to set that function with the button-card… Is it possible?
mayker
(maykar (pronounced "maker" with a southern accent))
956
Maybe I’m misunderstanding here, but the reason Olen was asking about it was because they were hiding the refresh option and needed a way to refresh without it. If you’re not hiding the refresh option there would be no need to change it. Browser_mod’s refresh option is just emulating the option that already exists in the menu. This is not an option added by Custom Header, it is a HA option if you are using YAML mode.
That is correct. And I solved it as you explained, so thanks for that. I still think it is strange that we need a custom module instead of this being a service in HA itself. But it works.
I even hid the button by using a transparent png as the trigger, so it is not even visible in the ui, and you need to know where it is to be able to click it…
The option to open CH in a dashboard that already has been modified by it, is not available anymore.
So after adding ?disable_ch you get the header back, can make modifications to cards etc but the CH option remains unavailable.
Restarting doesn’t make any difference.
Any suggestions are very welcome!
Nick
EDIT: CH was installed manually, already in HA 0.113
EDIT2: I just cannot find the option to re-enter CH after the header has been disabled.
Am I missing something?
I’ve not had that exact issue, but I have found that, if I refresh the page, the “Custom Header” option disappears from the menu (while Custom Header otherwise works as expected). If I navigate to another panel (such as Map) and then back to the dashboard, the option re-appears. That looks like it might be related.
Edit: I just found that waiting around 1 minute also makes the “Custom Header” option reappear for me.
Thanks for the awesome component, I really enjoy it since Lockdown!
I searched the thread, but didn’t find anything related: it is absolute cherry picking, but is there a way to prevent the “original” header to load for the glimpse of a second before costume header appears?
Opening the android app is kind of jumpy like that for the first moment…
Thanks for that tip Steven!
It seems to be a solution to navigate away but I had to first disable CH through Raw configuration editor, navigate away (refreshing the page would not help) and then the CH menu becomes available again.