This Home Assistant integration provides persistent, key-value storage backed by SQLite for automations, scripts, and integrations.
It allows you to store, update, retrieve, and delete arbitrary settings organized by scopes (namespaces) and keys, persisting them safely across Home Assistant restarts.
It is especially useful when you want to:
- Avoid cluttering Home Assistant with dummy helper entities (
input_text,input_number,input_boolean, template sensors, or switches) created solely to persist intermediate states or automation variables. - Store state, runtime configuration, or counters that need to persist across restarts.
- Organize settings into logical namespaces (
scope) and key names (name). - Share custom configuration data between different automations, scripts, and templates.
- Dynamically update and query parameters at runtime without modifying YAML configuration files.
This integration is installed via HACS:
- Click the button above to open the repository in HACS.
- Click Download to download the integration.
- Restart Home Assistant.
Note: Alternatively, you can add https://github.com/catgiggle/HomeAssistant-SettingsStore as a custom repository
under HACS → Integrations.
- Click the button above or go to Settings → Devices & Services → Add Integration and search for Settings Store.
- Configure the instance parameters:
You can add multiple instances of this integration. Each instance represents an isolated SQLite settings store.
| Parameter | Description |
|---|---|
Display name |
Display name for the instance (shown in Home Assistant UI). |
Internal name |
Unique identifier used as the SQLite database filename. If left empty, it is generated automatically from Display name. |
- Persistent key-value storage backed by SQLite (
.storage/settings_store/<name>.db) - Grouping of settings using scopes (namespaces) and keys
- Automatic tracking of creation (
created_at) and modification (modified_at) timestamps for each entry - No need to create throwaway helper entities (
input_*, dummy switches/sensors) just to store state - Atomic upsert operations (insert or update on key conflict)
- Diagnostic sensor reporting total stored entries count along with store-wide and per-scope metrics and timestamps
- Response data support in
getandlistservices for direct use in automations, scripts, and templates - Ability to delete individual entries or clear entries by scope or entire store
- Isolated storage per configured instance
Each configured instance creates the following diagnostic sensor:
Store: Displays the current total number of entries stored in the instance's database. This sensor automatically updates whenever records are created, updated, deleted or cleared. Itsentity_idis passed in thestoreparameter to the integration's services.- Attributes:
store_created_at: Timestamp of the first entry created in the store (YYYY-MM-DD HH:MM:SSornull).store_modified_at: Timestamp of the most recently modified entry across the entire store (YYYY-MM-DD HH:MM:SSornull).store_hash: MD5 checksum hash calculated from store entry count, first creation timestamp, and last modification timestamp.<scope>_count: Total number of entries stored in a given scope.<scope>_created_at: Timestamp of the first entry created in a given scope (YYYY-MM-DD HH:MM:SS).<scope>_modified_at: Timestamp of the most recently modified entry for a given scope (YYYY-MM-DD HH:MM:SS).
- Attributes:
This integration provides the following services:
Sets or updates a value for a specific scope and name in the store. If the entry already exists, its value is updated.
Alternatively, provide id to update an existing entry. An unknown id does not create an entry.
Updating by id changes the value and modification timestamp; the entry's name and scope remain unchanged.
| Field | Description |
|---|---|
store |
Entity ID of the Settings Store sensor (identifies target storage instance) |
id |
Optional ID of the entry to update; cannot be combined with scope or name |
scope |
Scope (defaults to default when updating by name) |
name |
Setting key name (required without id) |
value |
Value to store |
Partially updates a JSON value by scope and name, or by ID, merging properties without overwriting existing fields (JSON Merge Patch). If the entry does not exist, it is created. If either the existing or incoming value is not valid JSON, it falls back to replacing the value.
| Field | Description |
|---|---|
store |
Entity ID of the Settings Store sensor (identifies target storage instance) |
id |
Optional ID of the entry to patch; cannot be combined with scope or name |
scope |
Scope (defaults to default when updating by name) |
name |
Setting key name (required without id) |
value |
Value or JSON patch to merge |
Retrieves the stored value and timestamps by id or by scope and name. Supports returning service response data.
| Field | Description |
|---|---|
store |
Entity ID of the Settings Store sensor (identifies target storage instance) |
id |
Optional entry ID; cannot be combined with scope or name |
scope |
Scope (defaults to default when retrieving by name) |
name |
Setting key name (required without id) |
Returns a dictionary containing the entry ID, setting key name, scope, stored value and timestamps:
{
"id": 1,
"name": "last_run_duration",
"scope": "irrigation",
"value": "15",
"created_at": "2026-10-12 14:00:00",
"modified_at": "2026-10-12 14:30:00"
}id: Entry ID ornullif the key does not exist.name: Setting key name ornullif the key does not exist.scope: Scope / namespace identifier ornullif the key does not exist.value: Stored value string ornullif the key does not exist.created_at: Creation timestamp formatted asYYYY-MM-DD HH:MM:SS(ornullif not found).modified_at: Last modification timestamp formatted asYYYY-MM-DD HH:MM:SS(ornullif not found).
Retrieves all stored entries for a given scope (or across all scopes if scope: "*"), ordered alphabetically by key name. Supports returning service response data.
| Field | Description |
|---|---|
store |
Entity ID of the Settings Store sensor (identifies target storage instance) |
scope |
Scope / namespace identifier (optional, defaults to default; use * to list all entries across all scopes) |
Returns a dictionary containing a list array of stored entries:
{
"list": [
{
"id": 1,
"name": "interval_minutes",
"scope": "irrigation",
"value": "30",
"created_at": "2026-10-12 10:00:00",
"modified_at": "2026-10-12 10:00:00"
},
{
"id": 2,
"name": "last_run_duration",
"scope": "irrigation",
"value": "15",
"created_at": "2026-10-12 14:00:00",
"modified_at": "2026-10-12 14:30:00"
}
]
}list: Array of entries for the requested scope (ordered alphabetically byname, or byscopethennamewhen*is used).id: Entry ID.name: Setting key name.scope: Scope / namespace identifier.value: Stored value string.created_at: Creation timestamp formatted asYYYY-MM-DD HH:MM:SS.modified_at: Last modification timestamp formatted asYYYY-MM-DD HH:MM:SS.
Deletes a specific setting identified by ID or by scope and name. An unknown ID has no effect.
| Field | Description |
|---|---|
store |
Entity ID of the Settings Store sensor (identifies target storage instance) |
id |
Optional entry ID; cannot be combined with scope or name |
scope |
Scope / namespace identifier (optional, defaults to default without id) |
name |
Setting key name (required without id) |
Removes stored entries from the instance's database for a specific scope, or all entries across all scopes if scope: "*" is provided.
| Field | Description |
|---|---|
store |
Entity ID of the Settings Store sensor (identifies target storage instance) |
scope |
Scope / namespace identifier to clear (optional, defaults to default; use * to clear all scopes) |
action: settings_store.set
data:
store: sensor.settings_store_main_store
scope: irrigation
name: last_run_duration
value: "15"action: settings_store.get
data:
store: sensor.settings_store_main_store
scope: irrigation
name: last_run_duration
response_variable: saved_setting
action: notify.persistent_notification
data:
message: "Last duration was {{ saved_setting.value }} minutes (modified at {{ saved_setting.modified_at }})."action: settings_store.list
data:
store: sensor.settings_store_main_store
scope: irrigation
response_variable: irrigation_settings
action: notify.persistent_notification
data:
message: >
{% for entry in irrigation_settings.list %}
{{ entry.name }}: {{ entry.value }} (created: {{ entry.created_at }}, modified: {{ entry.modified_at }})
{% endfor %}action: settings_store.delete
data:
store: sensor.settings_store_main_store
scope: irrigation
name: last_run_durationTo update or delete an entry by ID, provide id instead of name and scope:
action: settings_store.set
data:
store: sensor.settings_store_main_store
id: 2
value: "20"action: settings_store.delete
data:
store: sensor.settings_store_main_store
id: 2action: settings_store.list
data:
store: sensor.settings_store_main_store
scope: "*"
response_variable: all_settings
action: notify.persistent_notification
data:
message: >
{% for entry in all_settings.list %}
[{{ entry.scope }}] {{ entry.name }}: {{ entry.value }} (modified: {{ entry.modified_at }})
{% endfor %}To clear settings within the default scope:
action: settings_store.clear
data:
store: sensor.settings_store_main_storeTo clear settings within a specific scope:
action: settings_store.clear
data:
store: sensor.settings_store_main_store
scope: irrigationTo clear all stored settings across all scopes:
action: settings_store.clear
data:
store: sensor.settings_store_main_store
scope: "*"- Settings are stored in
.storage/settings_store/<name>.dbwithin your Home Assistant configuration directory. - Values are stored as strings in SQLite, allowing you to store primitive values, JSON strings, or serialized payloads.
- Removing an instance through the Home Assistant UI will automatically delete its associated database file.

