I’m pretty new to HA. I’ve set it up and I keep editing the confirmation and everytime I restart to apply the changes, all the switches, sensors and even the thermostat lose their values. The most annoying is the thermostat (classic thermostat entity) because I have to turn it on selecting heat/cool and set the temperature. Is there a way to keep all these values across restarts?

Edit: I’m using HA OS on Proxmox. All the sensors and switches slowly goes back to “normal” as soon as they publish their state, apart from some entities that have values provided by HA itself and not by the devices (like the thermostat).

  • Scrubbles@poptalk.scrubbles.tech
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    8 months ago

    Are you using Docker? Forgive me if you know and understand docker - I’m just checking to make sure, but if you’re using Docker are you sure you set up your volumes correctly? Docker is stateless, so on any restart it would lose all of your info and be a clean install if you did not set up your volumes correctly

  • spaghettiwestern@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    8 months ago

    Something’s wrong with your configuration. What hardware, OS and HA config are you running?

    My HA install does not lose anything when restarted. All my wifi, Z-wave & Zigbee devices, various entities and thermostat come back in the same state as prior to restart. I’ve run HA Supervised on two HW platforms and 3 distros and they’ve all functioned this way.

    • peregus@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      I’m using HA OS on Proxmox. About the configuration, what do you need to know? Do you wanna see it all? All the sensors and switches slowly goes back to “normal” as soon as they publish their state.

      • spaghettiwestern@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        8 months ago

        HA OS on its own doesn’t behave that way, so that leaves Proxmox or perhaps your specific hardware. Can’t help you though. Haven’t tried HA in any kind of virtual environment.

        • peregus@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          8 months ago

          Indon’t think that the problem can come from Proxmox/HW since it happens everytime I restart the services, not the VM. So strange…

          • spaghettiwestern@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            8 months ago

            Perhaps so, but I’ve run HA on a Raspberry Pi under Raspberry OS, HA OS on that Pi, and HA Supervisor on a PC using Debian and am currently running it on a PC under Linux Mint. All of these worked with little or no delay between HA start and device status updates.

            • peregus@lemmy.worldOP
              link
              fedilink
              English
              arrow-up
              1
              ·
              8 months ago

              Since the updates comes from the devices and ate not requested from HA, some exposes their statuses in less than a minute, some (like temperature sensors that are battery powered) sends their statuses very less frequently (if the temperature doesn’t change, they communicate every 30/40 minutes.

    • peregus@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      Ah, interesting!!! I’ve tried enabling it just by adding recorder: in it the configuration file that, if I didn’t get it wrong, should record everything without exclusion, but…it doesn’t sensors/switches/thermostat setpoint and state are lost at config reload. Am I doing something wrong?

      • cedeho@feddit.de
        link
        fedilink
        English
        arrow-up
        3
        ·
        8 months ago

        recorder is enabled by default. however, when you are using docker it might be possible that the default file data base (it’s folder) is not mapped to a persistent location outside the container (resp. in the host file system).

        however, I really do not know much about all this docker related stuff. my recorder suggestion was just a shot into the blue. if I would be facing this problem I might just try to set up a relational data base like MySQL or PostgreSQL as a target for the recorder.

        • peregus@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          8 months ago

          The recorder was indeed already enabled, I’ve noticed from the home-assistant_v2.db file. Nevertheless I’m still losing everything when I reload the config. I’m not using docker, but HA OS. Any other…shot in the blue? 😁

          • cedeho@feddit.de
            link
            fedilink
            English
            arrow-up
            0
            ·
            8 months ago

            is the history of the values available after restart? like the graphs shown when you click a sensor entity?

            • peregus@lemmy.worldOP
              link
              fedilink
              English
              arrow-up
              1
              ·
              8 months ago

              Yes, the history of there, with some blanks around the time I’ve done some config reload

  • DeltaTangoLima@reddrefuge.com
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    8 months ago

    When you restart HA, keep an eye on the Summary tab for the Proxmox guest. If you’re seeing CPU or memory spikes going into the red, you might need to assign more resources to the guest. Also take a look at swap and boot disk utilization - do they seem particularly high?

    Also, over what period of time to the “go back to normal”? A few minutes, half an hour, more?