Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95414

Unknown states, old friendly names, old entities - how to get rid of them?

$
0
0

@JJussi wrote:

You have changed your sensor/light/… entities and/or their “friendly names” and end up to situation where that old stuff is still there and at “History” view shows their names with “Unknown” status?

You have maybe red from here that “delete home-assistant_v2.db and reboot your HA”. But, then you “loose” all information, including those entities what actually work!

There is “better” way. You just need to terminal connection to that machines /config directory where that home-assistant_v2.db -file is. Hass.io add-on “SSH & Web Terminal” works here fine.

  1. Open connection terminal/ssh
  2. Give command ‘cd /config’
  3. Give command ‘sqlite3 home-assistant_v2.db’
  4. Give command ‘delete from states where state = ‘unknown’;’
    // note that dot (.) before exit command
  5. Give command ‘.exit’

Refresh your “history” view at HA. :slight_smile:

At sqlite3, if you give command ‘.fullschema’, you get information what are structures of those schemas in use. From there you can figure out structure of data and you can delete some other data what you don’t need… Like events of sensors what don’t exist anymore.

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 95414

Trending Articles