{"id":13586302,"url":"https://github.com/apop880/config-check","last_synced_at":"2025-04-07T15:31:31.788Z","repository":{"id":222371765,"uuid":"197867243","full_name":"apop880/config-check","owner":"apop880","description":"Check your Home Assistant configuration from the frontend, or automatically when the configuration is updated, and optionally restart HASS automatically!","archived":false,"fork":false,"pushed_at":"2020-01-26T06:56:03.000Z","size":108,"stargazers_count":13,"open_issues_count":8,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-02-13T21:25:59.640Z","etag":null,"topics":["appdaemon-apps","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/apop880.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}},"created_at":"2019-07-20T02:08:06.000Z","updated_at":"2024-08-01T16:32:20.832Z","dependencies_parsed_at":null,"dependency_job_id":"419ccecd-cb7d-4a69-9730-c3ff55c8130e","html_url":"https://github.com/apop880/config-check","commit_stats":null,"previous_names":["apop880/config-check"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apop880%2Fconfig-check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apop880%2Fconfig-check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apop880%2Fconfig-check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apop880%2Fconfig-check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apop880","download_url":"https://codeload.github.com/apop880/config-check/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247679460,"owners_count":20978055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["appdaemon-apps","hacs"],"created_at":"2024-08-01T15:05:27.677Z","updated_at":"2025-04-07T15:31:31.774Z","avatar_url":"https://github.com/apop880.png","language":"Python","funding_links":["https://www.buymeacoffee.com/uMhxJCzPS"],"categories":["Python"],"sub_categories":[],"readme":"# Check Config\n[![hacs_badge](https://img.shields.io/badge/HACS-Default-orange.svg?style=for-the-badge)](https://github.com/custom-components/hacs)\n\u003ca href=\"https://www.buymeacoffee.com/uMhxJCzPS\" target=\"_blank\"\u003e\u003cimg\nsrc=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\"\nalt=\"Buy Me A Coffee\" style=\"height: 41px !important;width: 174px\n!important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5)\n!important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5)\n!important;\" \u003e\u003c/a\u003e\n\n### Requires AppDaemon\n\n**As of version 2.0, I am only testing against AppDaemon 4.x. The app will likely continue to work with\nAppDaemon 3.x, but if you have an issue and are using AppDaemon 3.x, I will not be able to provide support.**\n\n_Allows you to check your Home Assistant configuration from within Lovelace, or\nautomatically using when configuration.yaml is updated.\nOutputs the results to a sensor and can automatically restart HASS if\nconfiguration is valid._\n\n## Installation\n\nThis app is best installed using\n[HACS](https://github.com/custom-components/hacs), so that you can easily track\nand download updates.\n\nAlternatively, you can download the `check-config` directory from inside the `apps` directory here to your\nlocal `apps` directory, then add the configuration to enable the `checkconfig`\nmodule.\n\n## How it works\n\nThe app will auto-generate an entity called `sensor.config_result`. It has an\ninitial value of `-` until a configuration check is actually run. After running\na check, it will change to `valid` or `invalid`. If it is invalid, the `detail`\nattribute on the sensor will include additional data about the specific failure.\nIf it is valid, Home Assistant can restart automatically, or you can configure\nit to not restart until you do so manually.\n\n## App configuration\n\nAdd the following to your `apps.yaml` file:\n```yaml\ncheck_config:\n  module: checkconfig\n  class: CheckConfig\n```\n\nkey | optional | type | default | description\n-- | -- | -- | -- | --\n`module` | False | string | | `checkconfig`\n`class` | False | string | | `CheckConfig`\n`restart` | True | boolean | True | By default, Home Assistant will be restarted if the configuration is valid. Setting this to false will allow you to restart at the time of your choosing.\n`folder_watcher` | True | boolean | False | If you are using the `folder_watcher` component (see \"Using with Folder Watcher\" below), the app can automatically monitor for changes to `configuration.yaml` and run the check any time the file is changed.\n\n## Using With Lovelace\n\nYou will need to create an entity called `script.check_config`, but this script\ncan be blank and won't actually perform any steps. It simply allows us to call\nthe config check from Lovelace. Copying and pasting the following into your\n`scripts.yaml` file will add the proper script.\n\n```yaml\ncheck_config:\n  sequence: []\n  alias: Check Configuration\n```\n\nThe following is a basic example of a Lovelace example to run the check and show\nthe results.\n\n```yaml\ntype: entities\ntitle: Check Configuration\nshow_header_toggle: false\nentities:\n  - script.check_config\n  - sensor.config_result\n```\n\n## Using with Folder Watcher\n_Note: Folder Watcher support currently does not support split configuration files, nor will it monitor changes to secrets.yaml. Support for secrets.yaml and split configurations is planned for the next release. In addition, when using the Folder Watcher configuration, the Lovelace script configuration above will no longer work (but the sensor will still update for you to optionally display in Lovelace)._\n\nAs of version 0.3.0, the [Folder\nWatcher](https://www.home-assistant.io/components/folder_watcher/) component can\nbe integrated into this app. The app will then automatically trigger a\nconfiguration check when your `configuration.yaml` file is updated. You can then\neither have Home Assistant restart automatically, or continue to utilize the\nsensor updating as you see fit. For example, I have Telegram set up on the\ncomputer I perform my configuration updates on. So, I now receive a notification\nfrom Telegram on my desktop seconds after saving a change to\n`configuration.yaml`. If the config is invalid, the specific issue is called out\nin the notification. Otherwise, if it's valid, I have an inline keyboard button\nthat will restart Home Assistant when pressed.\n\nThe example code for this notification setup is included in `confignotify.py` in\nthis repository. Since everyone's notification setup is different, I am not\nattempting to include it in the main app at this time, but you are free to use\nwhat I have created as a starting point.\n\n\u003cimg\nsrc=\"https://raw.githubusercontent.com/apop880/config-check/master/telegram.png\"\u003e\n\nHere is the YAML I'm using to include `folder_watcher` in my setup to monitor\n`configuration.yaml`:\n```yaml\nfolder_watcher:\n  - folder: /config\n    patterns:\n      - '*.yaml'\n```\n\nYou also need your `config` directory under `whitelist_external_dirs` in the\n`homeassistant` section of `configuration.yaml`:\n```yaml\nhomeassistant:\n  whitelist_external_dirs:\n    - /config\n```\n\n## Example Screenshots\n\u003cimg src=\"https://raw.githubusercontent.com/apop880/config-check/master/lovelace-example.png\"\u003e\n\u003cimg\nsrc=\"https://raw.githubusercontent.com/apop880/config-check/master/result-error.png\"\u003e\n\n## Advanced Lovelace Config Examples\n\nAs a picture elements card with options to reload elements of your\nconfiguration, or a full restart:\n```yaml\ntype: custom:vertical-stack-in-card\ncards:\n  - type: picture-elements\n    image: /local/images/BG_blank_slim.png\n    elements:\n\n      - type: image\n        image: /local/images/icons8-administrative-tools-80.png\n        tap_action:\n          action: call-service\n          service: script.check_config\n        style:\n          top: 50%\n          left: 10%\n          width: 10%\n\n      - type: image\n        image: /local/images/icons8-restart-80.png\n        tap_action:\n          action: call-service\n          service: homeassistant.restart\n        style:\n          top: 50%\n          left: 26%\n          width: 10%\n\n      - type: image\n        image: /local/images/icons8-source-code-80.png\n        tap_action:\n          action: call-service\n          service: homeassistant.reload_core_config\n        style:\n          top: 50%\n          left: 42%\n          width: 10%\n\n      - type: image\n        image: /local/images/icons8-variation-80.png\n        tap_action:\n          action: call-service\n          service: group.reload\n        style:\n          top: 50%\n          left: 58%\n          width: 10%\n            \n      - type: image\n        image: /local/images/icons8-automation-80.png\n        tap_action:\n          action: call-service\n          service: automation.reload\n        style:\n          top: 50%\n          left: 74%\n          width: 10%\n\n      - type: image\n        image: /local/images/icons8-note-80.png\n        tap_action:\n          action: call-service\n          service: script.reload\n        style:\n          top: 50%\n          left: 90%\n          width: 10%\n\n\n  - type: entities\n    show_header_toggle: false\n    entities:\n      - sensor.config_result\n```\n\u003cimg src=\"https://raw.githubusercontent.com/apop880/config-check/master/picture-elements-example.jpeg\"\u003e\n\n## Issues/Feature Requests\n\nPlease log any issues or feature requests in this GitHub repository for me to review.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapop880%2Fconfig-check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapop880%2Fconfig-check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapop880%2Fconfig-check/lists"}