{"id":35178501,"url":"https://github.com/iamjoshk/discogs_sync","last_synced_at":"2026-04-26T01:32:21.931Z","repository":{"id":321265875,"uuid":"1057343365","full_name":"iamjoshk/discogs_sync","owner":"iamjoshk","description":"Home Assistant Custom Integration to sync your Discogs information and make it available in HA.","archived":false,"fork":false,"pushed_at":"2026-02-12T21:39:05.000Z","size":59,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-13T06:08:15.930Z","etag":null,"topics":["discogs","discogs-api","discogs-sync","hacs","hacs-custom","hacs-integration","home-assistant","home-assistant-custom-component","home-assistant-hacs"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamjoshk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-15T15:45:53.000Z","updated_at":"2025-12-31T15:19:23.000Z","dependencies_parsed_at":"2025-10-30T16:00:57.321Z","dependency_job_id":null,"html_url":"https://github.com/iamjoshk/discogs_sync","commit_stats":null,"previous_names":["iamjoshk/discogs_sync"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/iamjoshk/discogs_sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamjoshk%2Fdiscogs_sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamjoshk%2Fdiscogs_sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamjoshk%2Fdiscogs_sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamjoshk%2Fdiscogs_sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamjoshk","download_url":"https://codeload.github.com/iamjoshk/discogs_sync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamjoshk%2Fdiscogs_sync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32283294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discogs","discogs-api","discogs-sync","hacs","hacs-custom","hacs-integration","home-assistant","home-assistant-custom-component","home-assistant-hacs"],"created_at":"2025-12-28T23:51:54.204Z","updated_at":"2026-04-26T01:32:21.926Z","avatar_url":"https://github.com/iamjoshk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Discogs Sync - Home Assistant Discogs Integration\n\n[![hacs_badge](https://img.shields.io/badge/HACS-Custom-orange.svg)](https://github.com/custom-components/hacs)\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/iamjoshk/discogs_sync)](https://github.com/iamjoshk/discogs_sync/releases)\n\nThis integration brings your full [Discogs](https://www.discogs.com) collection into Home Assistant, expanding on the legacy core Discogs integration. It provides sensors for collection size, wantlist size, collection value, random record with configurable folder, folders list, and user lists. It also includes actions that can fetch your entire collection, wantlist, or user lists and make them available for display using cards like flex-table-card or downloaded as a JSON file.\n\n## Features\n\n- Collection count sensor\n- Wantlist count sensor\n- Collection value sensors (minimum, median, maximum)\n- Random record sensor with details and artwork\n- Configurable folder selection for the random record\n- User lists sensor with list details in attributes\n- User folders sensor with folder details in attributes\n- Buttons to refresh data for each API endpoint\n- Actions that return collection, wantlist, and user lists data for use in dashboards\n- Action that downloads thumbnail and cover art to local storage\n- Rate limit monitor\n- API Status monitor\n- Support for flex-table-card integration\n\n## Installation\n\n### HACS Installation (Recommended)\n\n[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=iamjoshk\u0026repository=https%3A%2F%2Fgithub.com%2Fiamjoshk%2Fdiscogs_sync\u0026category=integration)\n\n1. Make sure you have [HACS](https://hacs.xyz/) installed\n2. Add this repository as a custom repository in HACS:\n   - Go to HACS in Home Assistant\n   - Click the three dots in the upper right corner\n   - Select \"Custom repositories\"\n   - Add `https://github.com/iamjoshk/discogs_sync` with category \"Integration\"\n3. Click \"Add\"\n4. Then download the add-on\n5. Restart Home Assistant\n\n### Manual Installation\n\n1. Download the latest release from the [releases page](https://github.com/iamjoshk/discogs_sync/releases)\n2. Unpack the release and copy the `custom_components/discogs_sync` directory into your Home Assistant's `custom_components` directory\n3. Restart Home Assistant\n\n## Configuration\n\n### Integration Setup\n\n1. In Home Assistant, go to **Settings** \u003e **Integrations**\n2. Click the **+ ADD INTEGRATION** button\n3. Search for \"Discogs Sync\" and select it\n4. Enter your Discogs API token\n   - You can get your token from your [Discogs Developer Settings](https://www.discogs.com/settings/developers)\n5. Click \"Submit\"\n\n### API Token\n\nTo get your Discogs API token:\n\n1. Log in to your Discogs account\n2. Go to [Settings \u003e Developers](https://www.discogs.com/settings/developers)\n3. Generate a personal access token\n4. Copy the token and use it during integration setup\n\n### Integration Settings\n\nDuring integration set up, and later using the settings gear in the integration, you can set the update interval individually for the collection, waitlist, random record, collection values, folders, and lists entities. These intervals are in minutes. If you disable the automatic updates, then you can use automations to press the refresh buttons and refresh data from each endpoint at any interval you decide. You can also always press the buttons for an on-demand update even with automatic updates enabled.\n\n## Entities Created\n\n+ Collection sensor: A sensor that counts the number of releases in your collection folder.\n+ Collection Value sensors: 3 sensors that report the minimum, median, and maximum value of your collection based on Discogs sales.\n+ Wantlist sensor: A sensor that counts the number of releases in your wantlist.\n+ User Lists sensor: A sensor that counts the number of lists in your account. Attributes include name, id, uri, and public status for each list.\n+ User Folders sensor: A sensor that counts the number of collection folders in your account. Attributes include id, count, name, and resource_url for each folder.\n+ Random Record sensor: A sensor that displays a random record from your collection with details and artwork.\n+ Random Record Folder input select: a dropdown that lets you choose which folder to use for your random record sensor\n+ Rate Limit binary sensor: Turns on if the Discogs API rate limit has been hit. Attributes include the number of calls in the last minute.\n+ Refresh buttons: Individual buttons to manually refresh data for each endpoint (collection, wantlist, collection value, random record, user lists, and user folders).\n\n---\n\n## Available Actions\n\nNote: the data returned even for small collections will exceed the system limit (65535 characters) for entity attributes, so the download collection, wantlist, and user list action responses are returned as responses only with an option to download the response as a JSON file. The responses will NOT be saved to an entity.\n\n\nThe response can be used as a variable in a script or automation.\n\n### Download Collection Action - discogs_sync.download_collection\n\nThis action fetches your complete Discogs collection and can optionally save it to a JSON file.\n\nParameters:\n- `path` (optional): Path to save the collection file (default: `discogs_collection.json` in config folder)\n- `download` (optional): Whether to save to file (default: `false`)\n- `folder_id` (optional): Specify the folder id to download releases from (default: `0` which is the Discogs-created `All` folder)\n\nReturns:\n- Your complete collection data from the `All` folder (or specific folder if defined in the parameters)\n\n\u003cdetails\u003e\n   \n\u003csummary\u003eExpand for example response\u003c/summary\u003e\n   \n```\ncollection:\n  - id: 8302412\n    master_id: 72316\n    master_url: https://api.discogs.com/masters/72316\n    resource_url: https://api.discogs.com/releases/8302412\n    thumb: \u003e-\n      https://i.discogs.com/7C6ONIvFG8eJ4oMjVyk81DyWdsvsTxTcJh9I3ocFBDU/rs:fit/g:sm/q:40/h:150/w:150/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9SLTgzMDI0/MTItMTQ1ODk0OTc4/OS0zNDg2LmpwZWc.jpeg\n    cover_image: \u003e-\n      https://i.discogs.com/Xx4FZdNgsitGd1sqGnH3WokFfd2ZS67jok7ylJ5f4Ks/rs:fit/g:sm/q:90/h:598/w:600/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9SLTgzMDI0/MTItMTQ1ODk0OTc4/OS0zNDg2LmpwZWc.jpeg\n    title: The Best Of Procol Harum\n    year: 0\n    formats:\n      - name: Vinyl\n        qty: \"1\"\n        text: CRC\n        descriptions:\n          - LP\n          - Compilation\n          - Club Edition\n          - Stereo\n    labels:\n      - name: A\u0026M Records\n        catno: SP-3259\n        entity_type: \"1\"\n        entity_type_name: Label\n        id: 904\n        resource_url: https://api.discogs.com/labels/904\n    artists:\n      - name: Procol Harum\n        anv: \"\"\n        join: \"\"\n        role: \"\"\n        tracks: \"\"\n        id: 254414\n        resource_url: https://api.discogs.com/artists/254414\n    genres:\n      - Rock\n    styles: []\n  - id: 3036891\n    master_id: 24047\n    master_url: https://api.discogs.com/masters/24047\n    resource_url: https://api.discogs.com/releases/3036891\n    thumb: \u003e-\n      https://i.discogs.com/FaF4s-fa_TWaWaldWbx-VUdc5sju2XU-NBBVgfc2qsg/rs:fit/g:sm/q:40/h:150/w:150/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9SLTMwMzY4/OTEtMTMxMjc3ODcz/Mi5qcGVn.jpeg\n    cover_image: \u003e-\n      https://i.discogs.com/3ES45b8C7QNHx9Eg5P3aGthgz0P0YBlmpFXwuQvkiuw/rs:fit/g:sm/q:90/h:500/w:500/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9SLTMwMzY4/OTEtMTMxMjc3ODcz/Mi5qcGVn.jpeg\n    title: Abbey Road\n    year: 1971\n    formats:\n      - name: Vinyl\n        qty: \"1\"\n        text: Winchester Pressing\n        descriptions:\n          - LP\n          - Album\n          - Reissue\n          - Stereo\n    labels:\n      - name: Apple Records\n        catno: SO-383\n        entity_type: \"1\"\n        entity_type_name: Label\n        id: 25693\n        resource_url: https://api.discogs.com/labels/25693\n    artists:\n      - name: The Beatles\n        anv: \"\"\n        join: \"\"\n        role: \"\"\n        tracks: \"\"\n        id: 82730\n        resource_url: https://api.discogs.com/artists/82730\n    genres:\n      - Rock\n    styles:\n      - Pop Rock\n  - id: 1485752\n    master_id: 56036\n    master_url: https://api.discogs.com/masters/56036\n    resource_url: https://api.discogs.com/releases/1485752\n    thumb: \u003e-\n      https://i.discogs.com/l35SMx1IwmvVzGn2_xXSXxTxAgL8T-Dvmpchxh-K0YQ/rs:fit/g:sm/q:40/h:150/w:150/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9SLTE0ODU3/NTItMTU5MDM2NDk4/OS04NDEyLmpwZWc.jpeg\n    cover_image: \u003e-\n      https://i.discogs.com/C1kPzw91t--voE29LbYSgDzMd5QaT-f_qnPAtRCpG9I/rs:fit/g:sm/q:90/h:600/w:598/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9SLTE0ODU3/NTItMTU5MDM2NDk4/OS04NDEyLmpwZWc.jpeg\n    title: All Things Must Pass\n    year: 1970\n    formats:\n      - name: Vinyl\n        qty: \"3\"\n        text: \"Winchester Pressing \"\n        descriptions:\n          - LP\n          - Album\n          - Stereo\n      - name: Box Set\n        qty: \"1\"\n        descriptions: []\n    labels:\n      - name: Apple Records\n        catno: STCH 639\n        entity_type: \"1\"\n        entity_type_name: Label\n        id: 25693\n        resource_url: https://api.discogs.com/labels/25693\n    artists:\n      - name: George Harrison\n        anv: \"\"\n        join: \"\"\n        role: \"\"\n        tracks: \"\"\n        id: 243955\n        resource_url: https://api.discogs.com/artists/243955\n    genres:\n      - Rock\n    styles:\n      - Pop Rock\n  - id: 12775821\n    master_id: 46402\n    master_url: https://api.discogs.com/masters/46402\n    resource_url: https://api.discogs.com/releases/12775821\n    thumb: \u003e-\n      https://i.discogs.com/84NuSy4HCVkrkqj83kot90h48K2ZUrbey0Q34tYADN0/rs:fit/g:sm/q:40/h:150/w:150/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9SLTEyNzc1/ODIxLTE1NDIxODIw/MTQtMTg0Ni5qcGVn.jpeg\n    cover_image: \u003e-\n      https://i.discogs.com/8FDLemdNLoUnj8jBGiEZGYaG0kVB1LUBGPZZcbxOLHI/rs:fit/g:sm/q:90/h:600/w:600/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9SLTEyNzc1/ODIxLTE1NDIxODIw/MTQtMTg0Ni5qcGVn.jpeg\n    title: The Beatles And Esher Demos\n    year: 2018\n    formats:\n      - name: Vinyl\n        qty: \"2\"\n        text: 180g\n        descriptions:\n          - LP\n          - Album\n          - Reissue\n          - Remastered\n          - Stereo\n      - name: Vinyl\n        qty: \"2\"\n        text: 180g\n        descriptions:\n          - LP\n          - Stereo\n      - name: Box Set\n        qty: \"1\"\n        descriptions:\n          - Compilation\n    labels:\n      - name: Apple Records\n        catno: \"0602567572015\"\n        entity_type: \"1\"\n        entity_type_name: Label\n        id: 25693\n        resource_url: https://api.discogs.com/labels/25693\n      - name: Universal Music Group International\n        catno: \"0602567572015\"\n        entity_type: \"1\"\n        entity_type_name: Label\n        id: 138199\n        resource_url: https://api.discogs.com/labels/138199\n    artists:\n      - name: The Beatles\n        anv: \"\"\n        join: \"\"\n        role: \"\"\n        tracks: \"\"\n        id: 82730\n        resource_url: https://api.discogs.com/artists/82730\n    genres:\n      - Rock\n      - Pop\n    styles:\n      - Rock \u0026 Roll\n      - Pop Rock\n      - Soft Rock\n      - Psychedelic Rock\n      - Experimental\n      - Country Rock\n      - Blues Rock\n      - Avantgarde\n```\n\n\u003c/details\u003e\n\n\n---\n\n\n### Download Wantlist Action - `discogs_sync.download_wantlist`\n\nThis action fetches your complete Discogs wantlist and can optionally save it to a JSON file.\n\nParameters:\n- `path` (optional): Path to save the collection file (default: `discogs_wantlist.json` in config folder)\n- `download` (optional): Whether to save to file (default: `false`)\n\nReturns:\n- Your complete wantlist data\n\n\u003cdetails\u003e\n\n\u003csummary\u003eExpand for example response\u003c/summary\u003e\n\n```\nwantlist:\n  - id: 31381\n    master_id: 19493\n    master_url: https://api.discogs.com/masters/19493\n    resource_url: https://api.discogs.com/releases/31381\n    title: Head Hunters\n    year: 1973\n    formats:\n      - name: Vinyl\n        qty: \"1\"\n        descriptions:\n          - LP\n          - Album\n        text: Pitman Pressing\n    artists:\n      - name: Herbie Hancock\n        anv: \"\"\n        join: \"\"\n        role: \"\"\n        tracks: \"\"\n        id: 3865\n        resource_url: https://api.discogs.com/artists/3865\n    labels:\n      - name: Columbia\n        catno: KC 32731\n        entity_type: \"1\"\n        entity_type_name: Label\n        id: 1866\n        resource_url: https://api.discogs.com/labels/1866\n    thumb: \u003e-\n      https://i.discogs.com/hNhSZVdUZjUKO3ST78dt9TQ-muc62zOH9CWVk7z4WYk/rs:fit/g:sm/q:40/h:150/w:150/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9SLTMxMzgx/LTE0MzMyNTkxNDMt/ODUyMi5qcGVn.jpeg\n    cover_image: \u003e-\n      https://i.discogs.com/PzhEnDeEy-u3foEvF-q1mPZDeTGt__d6k4j9XUZ7q_c/rs:fit/g:sm/q:90/h:600/w:600/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9SLTMxMzgx/LTE0MzMyNTkxNDMt/ODUyMi5qcGVn.jpeg\n    genres:\n      - Jazz\n    styles:\n      - Jazz-Funk\n  - id: 677581\n    master_id: 72232\n    master_url: https://api.discogs.com/masters/72232\n    resource_url: https://api.discogs.com/releases/677581\n    title: Janis Joplin's Greatest Hits\n    year: 1973\n    formats:\n      - name: Vinyl\n        qty: \"1\"\n        descriptions:\n          - LP\n          - Compilation\n          - Stereo\n        text: Pitman\n    artists:\n      - name: Janis Joplin\n        anv: \"\"\n        join: \"\"\n        role: \"\"\n        tracks: \"\"\n        id: 120232\n        resource_url: https://api.discogs.com/artists/120232\n    labels:\n      - name: Columbia\n        catno: KC 32168\n        entity_type: \"1\"\n        entity_type_name: Label\n        id: 1866\n        resource_url: https://api.discogs.com/labels/1866\n      - name: Columbia\n        catno: KC 32168\n        entity_type: \"1\"\n        entity_type_name: Label\n        id: 1866\n        resource_url: https://api.discogs.com/labels/1866\n    thumb: \u003e-\n      https://i.discogs.com/wBbFpOx96fY-M3ujFqje3-viUujsDAbdSre6Uutcwwg/rs:fit/g:sm/q:40/h:150/w:150/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9SLTY3NzU4/MS0xMjc5MzA0Njk5/LmpwZWc.jpeg\n    cover_image: \u003e-\n      https://i.discogs.com/daRnbdjOFbSZjkuYZRD-W3FSoeakrgbr_KCK4rFkz0Q/rs:fit/g:sm/q:90/h:600/w:600/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9SLTY3NzU4/MS0xMjc5MzA0Njk5/LmpwZWc.jpeg\n    genres:\n      - Rock\n    styles:\n      - Blues Rock\n```\n\n\u003c/details\u003e\n\n---\n\n\n### Download User List Action - `discogs_sync.download_user_list`\n\nThis action fetches a specified user list and can optionally save it to a JSON file.\n\nParameters:\n- `list_id` (required): list ID to download\n- `path` (optional): Path to save the collection file (default: `discogs_user_list.json` in config folder)\n- `download` (optional): Whether to save to file (default: `false`)\n\nReturns:\n- The complete user list data\n\n\u003e Note: The lists that can be queried are not limited to your lists; however, private lists are only returned when your API call is authenticated as the owner. So you can return your own private lists and any public lists as long as you know the list ID. For a public list, the list ID is the number in the URL of the list on Discogs. For example: `https://www.discogs.com/lists/Album-covers-with-cats/1593344` the list id is `1593344`. Many lists are VERY long, so it may take some time to return the response. Be careful what you do with the data!\n\n### Download Image Action - `discogs_sync.download_image`\n\nThis action uses an authenticated API call to download cover art or thumbnails from Discogs.\n\nParameters:\n- `release_id` (required): the release ID for the image you want to download\n- `image_type` (required): choose cover or thumb\n- `path` (optional): specify the path and filename you want to download the image to, templatable\n- `download_file` (optional): enable downloading to the specified path\n\nReturns:\n- The image you requested\n\n\n## Using with flex-table-card\n\nThe `download_collection`, `download_wantlist`, and `download_user_list` actions can be used to populate a [flex-table-card](https://github.com/custom-cards/flex-table-card) to display your collection, wantlist, or a user list. First, install the flex-table-card from HACS.\n\nYou can run the action directly in the card OR as a script in the card. Using the action directly, you need `entities` to be empty. The advantage to using a script is auto-refreshing the card data.\n\n### Example flex-table-card Configuration\n\nAs an action directly:\n```\ntype: custom:flex-table-card\ntitle: My Discogs Collection\nenable_search: true\naction: discogs_sync.download_collection\nentities: []\nsort_by:\n  - Artists\n  - Year\ncolumns:\n  - name: Cover\n    data: collection.thumb\n    modify: \"x ? `\u003cimg src=\\\"${x}\\\" style=\\\"height:50px;\\\"/\u003e` : \\\"\\\"\"\n    align: center\n  - name: Artists\n    data: collection.artists\n    modify: x.map(a =\u003e a.name.replace(/^The /, \"\")).join(\", \")\n  - data: collection.title\n    name: Title\n  - data: collection.year\n    name: Year\n  - name: Format\n    data: collection.formats\n    modify: \"x \u0026\u0026 x.length \u003e 0 ? x[0].name : \\\"\\\"\"\n  - name: Genre\n    data: collection.genres\n  - name: Styles\n    data: collection.styles\n```\n\nAs a script:\n\nAs a script in the card, you can auto-refresh the data. Using `entity_id` in the variable lets the entity from flex-table-card be used for the script. This is an important part of the auto-refresh.\n\nScript:\n```\nsequence:\n  - data: {}\n    response_variable: discogs\n    action: discogs_sync.download_collection\n  - variables:\n      records: |\n        {% set response = { entity_id[0]: discogs } %} {{ response }}\n  - stop: All done\n    response_variable: records\nalias: Discogs Download Collection\n```\n\nand flex-table-card:\n```\ntype: custom:flex-table-card\ntitle: My Discogs Collection\nenable_search: true\naction: script.discogs_download_collection\nentities:\n  - sensor.my_collection  \u003c-- whatever sensor you use here will be passed to the script in the entity_id.\nsort_by:                      When this sensor is updated, the data will refresh.\n  - Artists\n  - Year\ncolumns:\n  - name: Cover\n    data: collection.thumb\n    modify: \"x ? `\u003cimg src=\\\"${x}\\\" style=\\\"height:50px;\\\"/\u003e` : \\\"\\\"\"\n    align: center\n  - name: Artists\n    data: collection.artists\n    modify: x.map(a =\u003e a.name.replace(/^The /, \"\")).join(\", \")\n  - data: collection.title\n    name: Title\n  - data: collection.year\n    name: Year\n  - name: Format\n    data: collection.formats\n    modify: \"x \u0026\u0026 x.length \u003e 0 ? x[0].name : \\\"\\\"\"\n  - name: Genre\n    data: collection.genres\n    modify: if(x.length == 0){\"\"}else{x}\n  - name: Styles\n    data: collection.styles\n    modify: if(x.length == 0){\"\"}else{x}\ngrid_options:\n  columns: full\n  rows: auto\ncard_mod:\n  style: |\n    ha-card {\n      overflow: auto;\n      max-height: 700px;\n    }\n```\n\n\nSometimes data from Discogs is incomplete or null, which causes flex-table-card to display `undefinedundefinedundefined` in the cell. You can mitigate this by using `modify: if(x.length == 0){\"\"}else{x}` in columns.\n\n\n\u003cimg width=\"841\" height=\"626\" alt=\"image\" src=\"https://github.com/user-attachments/assets/76821464-c85d-4bd4-b3f6-f1c52627717b\" /\u003e\n\n\n### Markdown Card\nUsing a markdown card, you can create a nice looking display for the random record.\n\n```\ntype: markdown\ncontent: |-\n  # **Random Play**\n  ## {{ states('sensor.discogs_sync_random_record') }}\n  {% set f = state_attr('sensor.discogs_sync_random_record','format') %}\n  {% if 'Vinyl' in f %}\n  ### Vinyl\n  {% elif 'Cassette' in f %}\n  ### Cassette\n  {% elif 'CD' in f %}\n  ### CD\n  {% else %}\n  ### Other\n  {% endif %}\n  ![image]({{ state_attr('sensor.discogs_sync_random_record','cover_image') }})\ntext_only: true\n```\n\n\u003cimg width=\"418\" height=\"528\" alt=\"image\" src=\"https://github.com/user-attachments/assets/deb56a23-87f1-42fb-8547-f484953c50bb\" /\u003e\n\n\n## Notes\n\n- The integration tries to respect [Discogs' API rate limits](https://www.discogs.com/developers/#page:home,header:home-rate-limiting) by adding delays between API calls (60 requests per minute for authenticated calls).\n- When using the download actions with large collections or wantlists, it may take some time to complete.\n- A binary sensor is created to monitor rate limit status. \n- The actions can only be called once every second to try and reduce rate limit restrictions.\n\n## Troubleshooting\n\n- If you see \"Rate limit exceeded\" warnings, wait 60 seconds before making another request\n- The rate limit binary sensor will show \"Problem\" when rate limits are exceeded and includes information about remaining limits in the attributes.\n- Editing flex-table-card calls the action repeatedly, so the data may not load until you save, wait a few seconds, and then refresh the browser.\n\n## Credits and Inspiration\n\n- [Discogs API Documentation](https://www.discogs.com/developers)\n- [Core Discogs integration](https://github.com/home-assistant/core/tree/dev/homeassistant/components/discogs)\n- [discogs-enhanced by @andreasc1](https://www.github.com/andreasc1/homeassistant-discogs-enhanced)\n- [Wine-Cellar by @EdLeckert](https://github.com/EdLeckert/wine-cellar)\n- [flex-table-card by @daringer](https://github.com/custom-cards/flex-table-card)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamjoshk%2Fdiscogs_sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamjoshk%2Fdiscogs_sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamjoshk%2Fdiscogs_sync/lists"}