Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikescops/terraform-provider-homeassistant
💡 Terraform Provider for Home Assistant
https://github.com/mikescops/terraform-provider-homeassistant
hashicorp terraform terraform-provider
Last synced: 27 days ago
JSON representation
💡 Terraform Provider for Home Assistant
- Host: GitHub
- URL: https://github.com/mikescops/terraform-provider-homeassistant
- Owner: Mikescops
- Created: 2020-12-28T11:02:01.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-02T21:25:11.000Z (almost 4 years ago)
- Last Synced: 2024-09-28T13:21:34.893Z (about 1 month ago)
- Topics: hashicorp, terraform, terraform-provider
- Language: Go
- Homepage: https://registry.terraform.io/providers/Mikescops/homeassistant/latest
- Size: 90.8 KB
- Stars: 13
- Watchers: 6
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Terraform Provider Home Assistant
User documentation is [available on Terraform Registry](https://registry.terraform.io/providers/Mikescops/homeassistant/latest/docs).
## Building provider
Run the following command to build the provider
```shell
go build -o terraform-provider-ha
```## Install the addon
First, build and install the provider.
```shell
make install
```Go to the examples directory :
```shell
terraform init && terraform apply
```## Requirements
- [Terraform](https://www.terraform.io/downloads.html) 0.14.3
- [Go](https://golang.org/doc/install) 1.15.6You can setup the provider in TF or use env variables like:
```bash
export HA_BEARER_TOKEN=xxxxxx
export HA_HOST_URL=https:///api
```### Using media players
In order to use "ha_mediaplayer", you need to have `media_extractor` integration on your Home Assistant instance.
Please, follow [this tutorial](https://www.home-assistant.io/integrations/media_extractor/).## How to run tests
You need to have a Home Assistant instance running with a dummy light setup.
To do so, add the following configuration to your configuration.yaml file :```yaml
# Dummy light
light:
- platform: template
lights:
dummy_light:
friendly_name: 'Dummy Light'
turn_on:
turn_off:
set_level:
```You also need to setup env variables in your terminal :
```bash
export HA_BEARER_TOKEN=xxxxxx
export HA_HOST_URL=https:///api
```Then run the following command :
```bash
make testacc
```