Common Tasks - Core


Update

Best practice for updating a Home Assistant installation:

  1. Backup your installation.

  2. Check the release notes for breaking changes on Home Assistant release notes. Be sure to check all release notes between the version you are running and the one you are upgrading to. Use the search function in your browser (CTRL + f / CMD + f) and search for Breaking Changes.

  3. Switch to the user that is running Home Assistant

    sudo -u homeassistant -H -s
    
  4. Activate the virtual environment that Home Assistant is running in

    source /srv/homeassistant/bin/activate
    
  5. Download and install the new version

    pip3 install --upgrade homeassistant
    
  6. When that is complete restart the service for it to use the new files.

Run a specific version

In the event that a Home Assistant Core version doesn’t play well with your hardware setup, you can downgrade to a previous release. In this example 2021.5.2 is used as the target version but you can choose the version you desire to run.

  1. Switch to the user that is running Home Assistant

    sudo -u homeassistant -H -s
    
  2. Activate the virtual environment that Home Assistant is running in

    source /srv/homeassistant/bin/activate
    
  3. Download and install the version you want

    pip3 install homeassistant==2021.5.2
    
  4. When that is complete restart the service for it to use the new files.

Run a beta version

If you would like to test next release before anyone else, you can install the beta version.

  1. Switch to the user that is running Home Assistant

    sudo -u homeassistant -H -s
    
  2. Activate the virtual environment that Home Assistant is running in

    source /srv/homeassistant/bin/activate
    
  3. Download and install the beta version

    pip3 install --pre --upgrade homeassistant
    
  4. When that is complete restart the service for it to use the new files.

Run a development version

If you want to stay on the bleeding-edge Home Assistant Core development branch, you can upgrade to dev.

The dev branch is likely to be unstable. Potential consequences include loss of data and instance corruption.

  1. Switch to the user that is running Home Assistant

    sudo -u homeassistant -H -s
    
  2. Activate the virtual environment that Home Assistant is running in

    source /srv/homeassistant/bin/activate
    
  3. Download and install the version you want

    pip3 install --upgrade git+git://github.com/home-assistant/[email protected]
    
  4. When that is complete restart the service for it to use the new files.

Configuration check

  1. Switch to the user that is running Home Assistant

    sudo -u homeassistant -H -s
    
  2. Activate the virtual environment that Home Assistant is running in

    source /srv/homeassistant/bin/activate
    
  3. Run the configuration check

    hass --script check_config
    
  4. When that is complete restart the service for it to use the new files.