Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Controllers
  3. Home Assistant
  4. can't remove unused sensors from HA

can't remove unused sensors from HA

Scheduled Pinned Locked Moved Home Assistant
10 Posts 6 Posters 195 Views 6 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • remedyjakeR Offline
    remedyjakeR Offline
    remedyjake
    wrote on last edited by
    #1

    I just got my gateway, first sensor, and an HA automation working (hass.io on a Rpi with serial gateway). In the process, I have a couple old versions of the sensor showing up in HA that I can't figure out how to remove. They appear in the GUI and in Developer>States>Entities, but they do not show up in Configuration>Entities list where I could delete them. (In fact, none of the mysensors sensors or gateway show up in the Entities list, even with Show Disabled Entities turned on).

    I've tried using the Configurator HA add-on to find a config file that lists the devices, but can't find it. Searching forums suggested that I need to shut down HA and edit a config file in command line, but not 100% sure that suggestion was appropriate for my problem. I am capable of that, but really hoping there is an easier way, as I expect this to be a common situation for me as I am prototyping and building out my HA setup. Appreciate any and all suggestions!

    fabyteF 1 Reply Last reply
    0
    • remedyjakeR remedyjake

      I just got my gateway, first sensor, and an HA automation working (hass.io on a Rpi with serial gateway). In the process, I have a couple old versions of the sensor showing up in HA that I can't figure out how to remove. They appear in the GUI and in Developer>States>Entities, but they do not show up in Configuration>Entities list where I could delete them. (In fact, none of the mysensors sensors or gateway show up in the Entities list, even with Show Disabled Entities turned on).

      I've tried using the Configurator HA add-on to find a config file that lists the devices, but can't find it. Searching forums suggested that I need to shut down HA and edit a config file in command line, but not 100% sure that suggestion was appropriate for my problem. I am capable of that, but really hoping there is an easier way, as I expect this to be a common situation for me as I am prototyping and building out my HA setup. Appreciate any and all suggestions!

      fabyteF Offline
      fabyteF Offline
      fabyte
      wrote on last edited by
      #2

      @Jake-Wills I believe you have a persistence file configured for the MySensors configuration?

      For me, the following steps worked:

      1. Stop home assistant/ HassIO
      2. Locate the persistence_file entry in your configuration.yaml
      3. Open this file and identity the entries you want to delete. Remove them from the file and save.
      4. I also cleaned up my database. It should be located under the HA/HassIO config directory and named .homeassistant/home-assistant_v2.db. Open it with sqlite3 and delete all entries from the states table of sensors you deleted. It might be you don't need to do this step but I'm not sure. If you're unfamiliar with databases, just skip this step and try out what happens.
      5. Start home assistant / HassIO
      1 Reply Last reply
      1
      • L Offline
        L Offline
        leonard
        wrote on last edited by
        #3

        The persistence has multiple downsides.

        The biggest for me was, that old sensor values are reported as new when restarting home assistant.

        The downside is, that the presentation of your nodes has to be more robust. If you use persistence, you do not notice if your nodes only present at startup. Without persistence, they will not reappear in HA, if they only present once after powering on.

        This might have changed meanwhile.

        Perhaps you are also affected from

        https://www.home-assistant.io/blog/2020/01/15/release-104/#improved-entity-handling-on-startup

        I am currently not running the latest HA version.

        Regards
        Leonard

        1 Reply Last reply
        1
        • remedyjakeR Offline
          remedyjakeR Offline
          remedyjake
          wrote on last edited by
          #4

          Thank you @fabyte ! I had mostly figured out the persistence file thing... had to jump through some hoops to change from pickle to json so I could edit it -- in the process cleared all my devices, but now I am set up to remove devices easily as i test and build out. Did not think about the database file... will check that out too. Appreciate the help!

          1 Reply Last reply
          1
          • K Offline
            K Offline
            KevinT
            wrote on last edited by
            #5

            I know this thread is old, but it might help others in future searches.

            I simply deleted the child I no longer used from the persistence file, saved it and restarted Home Assistant.
            The child was gone.
            If you want to change a child to a new sensor this also works.
            After restarting Home Assistant, power up the node and the child will present itself and update the persistence file.

            1 Reply Last reply
            0
            • electrikE Offline
              electrikE Offline
              electrik
              wrote on last edited by electrik
              #6

              With the latest MySensors integration this is how to delete entities:

              • disable the MySensors integration
              • delete the entities in Home Assistant (note you have to change the option to show the disabled entities since the integration is disabled)
              • delete the entities from the persistence file (if you skip this step the entities will pop up again)
              • start the MySensors integration

              Hope it helps someone!

              Max KurilovM 1 Reply Last reply
              1
              • electrikE electrik

                With the latest MySensors integration this is how to delete entities:

                • disable the MySensors integration
                • delete the entities in Home Assistant (note you have to change the option to show the disabled entities since the integration is disabled)
                • delete the entities from the persistence file (if you skip this step the entities will pop up again)
                • start the MySensors integration

                Hope it helps someone!

                Max KurilovM Offline
                Max KurilovM Offline
                Max Kurilov
                wrote on last edited by
                #7

                @electrik how do you delete entities in Home Assistant?

                After I disable integration I can navigate to objects and delete the objects corresponding to the sensors but I can't find the way to remove node itself.

                I've upgraded to the latest HA build (2021.12.10) but there is still no "remove" button for the MySensors devices.

                HW: HomeAssistant on Rock Pi 4 + Pro Mini Serial GW + Arduino & nRF52840 / 52811 nodes.

                1 Reply Last reply
                0
                • electrikE Offline
                  electrikE Offline
                  electrik
                  wrote on last edited by
                  #8

                  Have you also deleted the items from the persistence file?
                  What do you mean with objects in this case? Entities?

                  Max KurilovM 1 Reply Last reply
                  0
                  • electrikE electrik

                    Have you also deleted the items from the persistence file?
                    What do you mean with objects in this case? Entities?

                    Max KurilovM Offline
                    Max KurilovM Offline
                    Max Kurilov
                    wrote on last edited by
                    #9

                    @electrik yes I have. And yes, "objects" meant to be "entities" in my previous post. My inactive devices still present at the device list and I have no options to delete them via the HA interface whereas they have no related entities and json records.

                    HW: HomeAssistant on Rock Pi 4 + Pro Mini Serial GW + Arduino & nRF52840 / 52811 nodes.

                    1 Reply Last reply
                    0
                    • electrikE Offline
                      electrikE Offline
                      electrik
                      wrote on last edited by
                      #10

                      Yes now I understand what you mean, the nodes itself don't go away on my installation either.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      13

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.0k

                      Posts


                      Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • MySensors
                      • OpenHardware.io
                      • Categories
                      • Recent
                      • Tags
                      • Popular