Custom Component: HACS

I spent a lot of time doing exactly this when I first moved to HACS. I am running over 20+ integrations and plugins, many of which did not natively support HACS at the time. When I lost everything less than 24 hours later, I simply didn’t have the heart to do it all over again. Hence my request.

I honestly don’t want to beat a dead horse. My HACS migration experience didn’t go smoothly and I’m merely sharing my experience with the author with no expectations whatsoever.

I don’t know what went wrong for you and I agree it’s a pain having to get HACS to D/L everything again but I’ve migrated several systems from custom_updater to HACS and it works fine once it’s all setup.

Are you saying that not only did HACS itself get corrupted but that it also removed all of your integration/plugin files that it had downloaded and removed your configuration code from configuration.yaml for all of those things as well?

No. The HACS downloaded files and config.yaml code was still there. But the HACS app was completely reset. So despite the existence of the downloaded files and config.yaml settings, all of my integrations and plugins had to be re-added via the HACS UI if I wanted to continue updating said integrations and plugins going forward.

Ok, thats what I thought.

So now we are back to referencing my reply above.

Getting things back into the HACS system is literally just clicking “install” on the stuff you already had installed. Then at the end restarting HA once.

1 Like

Assuming you can remember them all!

Can always look in ssh or winscp to see what you installed…

that’s why I said:

:slightly_smiling_face:

Or as David said you can just look at your folders in the custom_components directory…

Either way it won’t suck too bad.

It’s kinda wierd that no one has suggested this, so here it goes.

Restore the files from backup! :o

No need to do anything manually when you do that :slight_smile:

8 Likes

Whoa! Whoa! Whoa! Let’s not get crazy here!!! Backups are for wimps! :wink:

1 Like

Hi Finity,

This sounds like a great way of keeping track, but I am not exactly sure what you do. Could please elaborate a bit? What package are you creating for your CC’s?
Thanks

in my packages directory I create a file called “custom_components_package.yaml”. In that file I have all of the configuration code required for any of the custom components.

Example:

## https://github.com/thomasloven/hass-browser_mod
browser_mod:

sensor:
## https://github.com/pnbruckner/ha-sun2 
  - platform: sun2
    monitored_conditions:
      - solar_midnight
      - astronomical_dawn
      - nautical_dawn
      - dawn
      - sunrise
      - solar_noon
      - sunset
      - dusk
      - nautical_dusk
      - astronomical_dusk
      - daylight
      - civil_daylight
      - nautical_daylight
      - astronomical_daylight
      - night
      - civil_night
      - nautical_night
      - astronomical_night
      
## https://github.com/custom-components/sensor.authenticated
  - platform: authenticated
    enable_notification: 'True'

# https://github.com/pnbruckner/homeassistant-config/blob/53fe1dff32a36a84a4efdbb87b72387d4ce5f091/docs/sun.md
sun:
  monitored_conditions:
    - azimuth
    - elevation
    - next_dawn
    - next_dusk
    - next_midnight
    - next_noon

## https://github.com/keatontaylor/alexa_media_player
alexa_media:
  accounts:
    - email: !secret amazon_email
      password: !secret amazon_pass
      url: amazon.com

## https://github.com/custom-components/breaking_changes ##
breaking_changes:

## https://gist.github.com/xlcnd/b8b8190b377a08c16e1cf2a96aa7003f    
camera:
  - platform: foscamsd
    ip: 192.168.1.51
    port: 8001
    username: !secret cam_user
    password: !secret new_cam_pw
    name: Kitchen

## https://github.com/MatthewFlamm/nwsradar  
  - platform: nwsradar
    station: IWX
    style: Enhanced
    frames: 8
    
## https://github.com/rgruebel/ha_zigbee2mqtt_networkmap
zigbee2mqtt_networkmap:

## https://github.com/rogro82/hass-variables
variable:

a ok, thanks. I’ve organized my complete HA config like that (have the packages per functionality/use and also the CC settings in there)
Thought you might have had a special CC library for the Lovelace resources in HACS.

cool, thanks for extra post!

Beta (0.14.0b0) released

2 Likes

Beta (0.14.0b1) released

1 Like

Is there a way to get the changelog readable? In GitHub, I just see the diffs between the different files for some reason…

Thanks again for this great tool!

For now that is the changelog, I will prettify it when the beta ends.

Yesterday the beta didn’t show up in the menu, even though ‘show beta’ was selected.
Solved it with ‘settings’ -> ‘upgrade all’, beta was installed.
Today 0.14.0b1 shows up, but after upgrade and restart (multiple times) i’m still on 0b0.
Anyone else?

I forgot to change the version number in the const.py file :wink:

1 Like

If you are using my Lovelace Home Feed Card, a great way of including details updates from HACS in your feed is to have a config something like this:

type: 'custom:home-feed-card'
title: Home Feed
id_filter: ^home_feed_.*
entities:
  - entity: sensor.hacs
    icon: 'mdi:update'
    multiple_items: true
    list_attribute: repositories
    content_template: 'Update available for {{display_name}} to {{available version}}'

Note: I’m using the HACS beta, which added display_name as an attribute to the repositories list for sensor.hacs, if you aren’t on the beta simply replace display_name with name

1 Like