A Home Assistant integration that allows you to add custom notes to any entity using the "more info" dialog. Perfect for documenting device locations, maintenance schedules, configuration details, or any other information you want to keep with your entities.
- ποΈ Add notes to any entity or device - Works with all Home Assistant entities and devices (lights, sensors, switches, etc.)
- πΎ Persistent storage - Notes are saved permanently and survive restarts
- π¨ Auto-resizing textarea - Input field automatically adjusts to content size
- π± Responsive design - Works on desktop and mobile
- π Local storage - All data stays on your Home Assistant instance
- β‘ Real-time updates - Changes are saved instantly
- π― Configurable character limit - Set maximum note length (50-2000 characters)
- ποΈ Configurable button visibility - Hide Save/Delete buttons when no notes exist
- π Automatic backup integration - Notes included in Home Assistant backups
- π οΈ Manual backup services - Additional backup and restore services available
The Entity Notes integration adds a notes section to every entity's "more info" dialog, allowing you to quickly add, edit, or delete notes associated with that entity.
- In Home Assistant, open HACS β Integrations
- Search for Entity Notes
- Install the integration
- Restart Home Assistant
- Download the latest release from the releases page
- Extract the contents
- Copy the
custom_components/entity_notesfolder to your Home Assistantcustom_componentsdirectory - Restart Home Assistant
- Go to Settings β Devices & Services
- Click "Add Integration"
- Search for "Entity Notes"
- Click to add the integration
- Configure your preferences:
- Enable debug logging: Enable detailed logging for troubleshooting
- Hide buttons when no note exists: Hide Save/Delete buttons when no note exists
- Enable automatic backups: Notes are automatically included in Home Assistant backups
- Maximum note length: Set character limit (50-2000 characters)
When you change any of these options, please reload the integration. HA only registes these settings on integration load / reload. You'll likely also need to clear browser cache to see the changes take effect too. So much caching!
| Option | Description | Default | Range |
|---|---|---|---|
| Debug Logging | Enable detailed logging for troubleshooting | false |
true/false |
| Hide Buttons When Empty | Hide Save/Delete buttons when no note exists | false |
true/false |
| Enable automatic backups | Include notes in HA backups | true |
true/false |
| Maximum Note Length | Character limit for notes | 200 |
50-2000 |
Purpose: Provides detailed logging information for troubleshooting and development purposes.
When to enable:
- π Troubleshooting issues: When notes aren't appearing, saving, or loading correctly
- π Development work: When contributing to the project or customizing functionality
- π Performance analysis: To understand how the integration processes entity data
- π¨ Error investigation: When experiencing unexpected behavior
What it logs:
- Entity ID detection and processing
- Note loading and saving operations
- Configuration changes and cache updates
- Frontend JavaScript initialization and errors
- API endpoint requests and responses
- Integration startup and shutdown events
Log location: Check Settings β System β Logs or your Home Assistant log files
Example log entries:
[custom_components.entity_notes] Entity Notes: Found entity ID: light.living_room
[custom_components.entity_notes] Note loaded successfully for sensor.temperature
[custom_components.entity_notes] Configuration updated: hide_buttons_when_empty=true
Purpose: Provides a cleaner, less cluttered user interface by hiding the Save and Delete buttons when an entity has no existing note.
Visual behavior:
-
When enabled (
true):- ποΈ Buttons are hidden when the text area is empty AND no existing note exists
- ποΈ Buttons appear as soon as you start typing or if a note already exists
- π¨ Creates a minimalist interface focused on entities that actually have notes
-
When disabled (
false):- ποΈ Buttons are always visible regardless of note content
- π¨ Provides consistent interface across all entities
Use cases:
Enable this feature if you:
- π― Want a cleaner, less cluttered interface
- π± Use mobile devices where screen space is limited
- π Prefer to focus attention on entities that actually have notes
- β¨ Like minimalist UI design
Keep disabled if you:
- π― Want consistent button placement across all entities
- π±οΈ Prefer always-visible controls for quick access
- π₯ Have multiple users who might be confused by disappearing buttons
- π Frequently add/remove notes and want persistent controls
Technical details:
- Changes take effect immediately without restart
- Uses intelligent detection to show buttons when typing begins
- Remembers existing note state to show buttons appropriately
- Fully configurable per Home Assistant instance
Example scenarios:
# Scenario 1: Clean interface preferred
hide_buttons_when_empty: true
# Result: Only entities with notes show buttons initially
# Scenario 2: Consistent interface preferred
hide_buttons_when_empty: false
# Result: All entities always show Save/Delete buttons- Click on any entity to open its "more info" dialog
- Scroll down to find the "π Notes" section
- Click in the text area to add or edit notes
- Use the "SAVE" button to save your changes
- Use the "DELETE" button to remove notes entirely
- The text area automatically resizes based on content
- Empty notes are automatically removed to keep storage clean
- Character count is displayed to help you stay within limits
- Configuration changes take effect immediately without restart
Entity Notes provides comprehensive data protection through multiple backup mechanisms:
Your notes are automatically protected through Home Assistant's built-in backup system:
- Automatic inclusion: Notes are stored in
.storage/entity_notes.notesand automatically included in all Home Assistant backups - System-wide protection: When you create a Home Assistant backup (manual or scheduled), your notes are included
- Restore compatibility: Notes are automatically restored when you restore a Home Assistant backup
- No additional setup required: This protection works out of the box
The integration also provides dedicated backup services for additional flexibility:
| Service | Description | Usage |
|---|---|---|
entity_notes.backup_notes |
Create a manual backup of all notes | Call manually or via automation |
entity_notes.restore_notes |
Restore notes from manual backup | Call manually or via automation |
- Backup location:
<config_directory>/entity_notes_backup.json - Format: Human-readable JSON file
- Content: All entity notes with their associated entity IDs
- Use cases:
- Before major system changes
- Creating specific notes-only backups
- Migrating notes between systems
- Automated backup schedules
automation:
- alias: "Backup Entity Notes Weekly"
trigger:
- platform: time
at: "02:00:00"
condition:
- condition: time
weekday:
- sun
action:
- service: entity_notes.backup_notesCreate a backup:
service: entity_notes.backup_notesRestore from backup:
service: entity_notes.restore_notes- Rely on Home Assistant backups: Your notes are automatically protected through regular HA backups
- Use manual services for specific needs: Create targeted backups before major changes
- Schedule regular backups: Set up automations for additional protection
- Test restore procedures: Verify your backup strategy works as expected
The integration exposes REST API endpoints for programmatic access:
GET /api/entity_notes/{entity_id}- Retrieve note for an entityPOST /api/entity_notes/{entity_id}- Save note for an entity (JSON:{"note": "text"})DELETE /api/entity_notes/{entity_id}- Delete note for an entity
ha-entity-notes/
βββ custom_components/
β βββ entity_notes/
β βββ __init__.py # Main integration logic and API endpoints
β βββ manifest.json # Integration manifest
β βββ config_flow.py # Configuration UI
β βββ const.py # Constants and configuration
β βββ entity-notes.js # Frontend JavaScript component
β βββ services.yaml # Service definitions
β βββ translations/
β βββ en.json # English translations
βββ hacs.json # HACS configuration
βββ README.md # This documentation
βββ info.md # HACS info file
__init__.py- Contains the main integration setup, storage management, REST API endpoints, and backup servicesmanifest.json- Home Assistant integration manifest defining dependencies, version, and metadataconfig_flow.py- Provides the configuration UI for setting up and modifying integration optionsconst.py- Defines constants used throughout the integrationentity-notes.js- Frontend component that injects the notes interface into entity dialogsservices.yaml- Defines the backup and restore services exposed by the integrationtranslations/en.json- English language translations for the configuration UI
Creates a manual backup of all entity notes.
Parameters: None
Example:
service: entity_notes.backup_notesRestores entity notes from a manual backup file.
Parameters: None
Example:
service: entity_notes.restore_notesProgrammatically set a note for an entity.
Parameters:
entity_id(required): The entity ID to add a note tonote(required): The note text
Example:
service: entity_notes.set_note
data:
entity_id: light.living_room
note: "Replaced bulb on 2024-01-15"Retrieve a note for an entity (fires an event with the result).
Parameters:
entity_id(required): The entity ID to get the note for
Delete a note for an entity.
Parameters:
entity_id(required): The entity ID to delete the note from
Get all notes (fires an event with the result).
Parameters: None
- Clear browser cache and/or force refresh
- On mobile devices, clear the Home Assistant app cache
- Restart Home Assistant after configuration changes
- Check that the integration is properly loaded in Settings β Devices & Services
- Check Home Assistant logs for error messages
- Ensure the integration is properly installed and loaded
- Verify file permissions in the Home Assistant directory
- Check available disk space
- Reload the integration to foce configuration changes
- Clear browser cache after configuration changes
- If issues persist, restart Home Assistant
- Open browser developer tools (F12) and check for JavaScript errors
- Ensure the script is loading properly: look for
entity-notes.jsin Network tab - Check for Content Security Policy (CSP) violations
- Verify the backup file exists at
<config_directory>/entity_notes_backup.json - Check Home Assistant logs for backup service errors
- Ensure sufficient disk space for backup operations
- Verify file permissions for the config directory
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions:
- Check the troubleshooting section
- Search existing issues
- Create a new issue with detailed information about your problem
