Bonjour,
je rencontre un problème pour la mise en place exceptions pour custom side-bar
j'ai mis en place, grâce au code de warcozes une custom side-bar avec 3 menus.
- outils de développement
- market-place
- clear front end
je voudrais que les 2 premiers soit masqué pour les non admin.
j'ai utilisé l'option - is_admin: true
mais c'est pas bon, tout disparait pour tout le monde.
exceptions:
- is_admin: true
order:
- new_item: true
item: "Clear Frontend Cache"
icon: "mdi:cached"
bottom: true
order: 0
on_click:
action: 'javascript'
code: |
const event = new CustomEvent(
'll-custom',
{
detail: {
uix: {
action: 'clear_cache'
}
}
}
);
document.dispatchEvent(event);
- new_item: true
item: "Outils de développement"
icon: "mdi:tools"
href: "/config/developer-tools"
bottom: true
order: 1
- new_item: true
item: "Marketplace"
href: /marketplace
icon: mdi:store
notification: |
[[[
const outdated = Object.values(entities.update).filter(
(entity) => entity.platform === 'marketplace' && is_state(entity.entity_id, 'on')
);
return outdated.length || '';
]]]
icon_color: |
[[[
const outdated = Object.values(entities.update).filter(
(entity) => entity.platform === 'marketplace' && is_state(entity.entity_id, 'on')
);
return outdated.length > 0 ? 'rgba(255,0,0,1)' : 'rgba(0,128,0,1)';
]]]
icon_color_selected: |
[[[
const outdated = Object.values(entities.update).filter(
(entity) => entity.platform === 'marketplace' && is_state(entity.entity_id, 'on')
);
return outdated.length > 0 ? 'rgba(255,0,0,1)' : 'rgba(0,128,0,1)';
]]]
item_background_hover: |
[[[
const outdated = Object.values(entities.update).filter(
(entity) => entity.platform === 'marketplace' && is_state(entity.entity_id, 'on')
);
return outdated.length > 0 ? 'rgba(255,0,0,1)' : 'rgba(0,128,0,1)';
]]]
item_background_hover_opacity: |
[[[
const outdated = Object.values(entities.update).filter(
(entity) => entity.platform === 'marketplace' && is_state(entity.entity_id, 'on')
);
return outdated.length > 0 ? '0.4' : '0.2';
]]]
selection_opacity: |
[[[
const outdated = Object.values(entities.update).filter(
(entity) => entity.platform === 'marketplace' && is_state(entity.entity_id, 'on')
);
return outdated.length > 0 ? '0.4' : '0.2';
]]]
bottom: true
order: 2
j'ai essayé de suivre la Doc fourni par warcozes, mais je suis nul en yaml.
je dois louper quelque chose, merci pour votre aide.

