diff --git a/.github/workflows/hassfest.yaml b/.github/workflows/hassfest.yaml new file mode 100644 index 0000000..109eae9 --- /dev/null +++ b/.github/workflows/hassfest.yaml @@ -0,0 +1,14 @@ +name: Validate with hassfest + +on: + push: + pull_request: + schedule: + - cron: "0 0 * * *" + +jobs: + validate: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v2" + - uses: home-assistant/actions/hassfest@master \ No newline at end of file diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..b31f408 --- /dev/null +++ b/install.sh @@ -0,0 +1,5 @@ +#!/bin/bash +git clone https://github.com/andvikt/mega_hacs.git +mkdir custom_components +cp mega_hacs/custom_components/mega custom_components/mega +rm -fR mega_hacs diff --git a/readme.md b/readme.md index 050fa92..b2ad004 100644 --- a/readme.md +++ b/readme.md @@ -13,15 +13,18 @@ ## Устройства Поддерживаются устройства: light, switch, binary_sensor, sensor. light может работать как диммер ## Установка -В папке config/custom_components выполнить: - ```shell - git clone https://github.com/andvikt/mega.git - ``` - Обновление: - ```shell - git pull - ``` +Рекомендованнй способ - через [HACS](https://hacs.xyz/docs/installation/installation). +После установки HACS, нужно перейти в меню hacs -> integrations, далее в верхнем правом углу +нажать три точки, где будет `Custom repositories`, открыть, нажать add и добавить `https://github.com/andvikt/mega_hacs.git` + +Альтернативный способ установки: +```shell +# из папки с конфигом +wget -q -O - https://raw.githubusercontent.com/andvikt/mega_hacs/master/install.sh | bash - +``` Перезагрузить HA + +Для обновления повторить ## Зависимости Перед использованием необходимо настроить интеграцию mqtt в HomeAssistant