Instruction file imported from ruaan-deysel/ha-unraid (
.github/instructions/json.instructions.md). Copyright stays with the author.
JSON Data Files Guidelines — ha-unraid
Refer to AGENTS.md for full project documentation.
icons.json
Defines Material Design Icons (mdi) for entities, keyed by translation key.
Structure
{
"entity": {
"sensor": {
"cpu_usage": { "default": "mdi:cpu-64-bit" },
"array_state": {
"default": "mdi:harddisk",
"state": {
"started": "mdi:harddisk",
"stopped": "mdi:harddisk-remove"
}
}
},
"binary_sensor": { ... },
"switch": { ... },
"button": { ... }
}
}
Rules
- Every entity with
_attr_translation_keymust have a matching entry inicons.json - Use
mdi:prefix for all icons (Material Design Icons) - Use
"state"sub-object for state-dependent icons - Group by platform (
sensor,binary_sensor,switch,button) - Keep icons consistent within categories (e.g., all storage icons use
mdi:harddiskvariants)
Adding a New Entity Icon
- Add the translation key to
strings.jsonfirst - Add matching icon entry to
icons.jsonunder the correct platform - Verify the icon exists at https://pictogrammers.com/library/mdi/