“This is the Home Assistant user’s name, not username (if they’re different). You can look to the bottom of the CCH editor or in the HA user list to see which to use. This option is case sensitive.”
The user list can be found by clicking the “configuration” tab in the sidebar, then “users”
Thank you, I saw that instruction, but I can’t find the CCH editor (I use yaml) and in the HA user list, the name is not the same as the login name.
mayker
(maykar (pronounced "maker" with a southern accent))
1176
For an example, I just created a new user on my system. This user has the username “username” and the user’s name is “User Name”. It displays like this in the list:
Edit: I fear that I may made it more confusing by using “User Name” as the example, if so I apologize.
mayker
(maykar (pronounced "maker" with a southern accent))
1177
If you’ve forgotten which name was used or are still having issues you can go into your browser’s dev-tools (F12) while on HA and paste this into the console:
Until I find the time to update the docs you can refer to this post and the previous pre-release’s post for new features/fixes. Will have the docs updated soon, but I wanted to get this release out since it has fixes for 0.99. Will be updating the version for legacy devices soon as well.
Added Features:
time_css: & date_css: add custom css for time and date seperately. Used like the custom css options explained in the previous release’s post.
default_tab_template: Use javascript templates for default tab. Template should return a tab number, path, or title. Used like conditional styling templates, example below.
edit_mode_show_tabs: set to true to always show all tabs when in edit mode.
Fixes
Occasionally the current tab was hidden from view when navigating with a button or using default_tab. The tab is now scrolled into view in those cases.
Non-template conditional styles were very buggy and sometimes wouldn’t survive a page reload. I’ve rewritten that portion to deal with those issues.
Added fixes for background images and a few other elements for HA 0.99
Default Tab Template Example:
cch:
default_tab_template: >
if (states["input_boolean.home"].state == "off") "home";
else if (states["input_boolean.away"].state == "on") 2;
else 0;
Ahh the default tab template would enable me to show a different view based on states correct? So for example if I make a shoppinglist view and my device tracker’s state is in the supermarket I could have it show the shoppinglist when I open HA?
Are conditions possible as wel? Or say default tab per user?
mayker
(maykar (pronounced "maker" with a southern accent))
1181
Yep and you can use default_tab_template with any of the conditions as well.
Exactly this templating stuff is great as it will save me from using state-switches and/or browser_mod to achieve this.
Really great work. Just a wild question which has nothing to do with your custom card @mayker, would it be possible to do the same for backgrounds? As in lovelace wallpaper with a template like the header?
local/lovelace/resources/compact-custom-header/compact-custom-header.js?v=1.3.7:1033:13 Uncaught ReferenceError: above is not defined
1 Like
mayker
(maykar (pronounced "maker" with a southern accent))
1186
That was my mistake, just pushed 1.3.8 to fix and also make default tab respect redirect settings. It’s likely that error was preventing the view from being shown as well.
# https://github.com/maykar/compact-custom-header/wiki/Main-Config-Options
#type: custom:compact-custom-header
#main_config: true
header: true
menu: show
options: show
swipe: true
swipe_animate: none
chevrons: true
exceptions:
- conditions:
user_agent: iPhone
config:
menu: hide
notifications: hide
header: true
options: hide
conditional_styles:
- template:
- tab:
'alarm':
icon: >
var alarm = entity['alarm_control_panel.ha_main_alarm'].state;
if (alarm == 'disarmed') 'mdi:shield-check';
else if (alarm == 'armed_away') 'mdi:shield-lock';
else if (alarm == 'armed_custom_bypass') 'mdi:security';
else if (alarm == 'armed_home') 'mdi:shield-home';
else if (alarm == 'armed_night') 'mdi:shield-home';
else if (alarm == 'pending') 'mdi:shield-outline';
else if (alarm == 'triggered') 'mdi:bell-alert';
else 'mdi:shield-check';
- tab:
'phones_tablets':
icon: >
var family = entity['sensor.family_home'].state;
if (family == '0') 'mdi:account-off';
else if (family == '1') 'mdi:account';
else if (family == '2') 'mdi:account-multiple';
else if (family == '3') 'mdi:account-multiple-check';
else 'mdi:account-group';
- tab:
'weer_klimaat':
icon: >
var weer = entity['sensor.weather_icon'].state;
weer;
- entity: notifications
condition:
state: false # When there are no notifications...
button: # hide notifications button.
notifications:
hide: true
it’s the tab weer_klimaat I am navigating to.
mayker
(maykar (pronounced "maker" with a southern accent))
1190
If you’re using HA version 0.96 or above remove this:
- entity: notifications
condition:
state: false # When there are no notifications...
button: # hide notifications button.
notifications:
hide: true
I’ll make an exception for it in the next release, but there is no longer a notifications button in the header so that code does nothing, except cause an error.
I’ve made the template to switch to the music tab if Spotify is playing which is great, One question though is it possible for it to switch to that tab when HA is already open? I’ve noticed it will only go to that tab on opening HA. Great update mate
I created a new user, i’m running the latest version of hassio.
my question is how can i configure that the user will see only one tab, i want to hide everything else.