PHPackages                             aryxs3m/laravel-hoas - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. aryxs3m/laravel-hoas

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

aryxs3m/laravel-hoas
====================

Connect your Laravel application with your Home Assistant instance.

381PHP

Since Dec 31Pushed 2y ago1 watchersCompare

[ Source](https://github.com/aryxs3m/laravel-hoas)[ Packagist](https://packagist.org/packages/aryxs3m/laravel-hoas)[ RSS](/packages/aryxs3m-laravel-hoas/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Home Assistant - Laravel integration
====================================

[](#home-assistant---laravel-integration)

With this simple package you can create Home Assistant devices and entities (via MQTT).

You can achieve two-way communication with your Home Assistant instance: publish sensors that produce data for your Home Assistant instance, or publish switches which you can change in Home Assistant and modify your Laravel app's behavior.

**Currently supported entity types:**

- binary sensor
- sensor
- button
- switch

Installing
----------

[](#installing)

Install via composer:

```
composer install aryxs3m/laravel-hoas
```

Publish config:

```
php artisan vendor:publish --provider="Aryxs3m\LaravelHoas\Providers\HomeAssistantProvider"
```

Fill up `config/hoas.php` with your MQTT broker's parameters or use the predefined environment variables. See the config file.

Add the provider to your `app.php` config:

```
    'providers' => ServiceProvider::defaultProviders()->merge([
        /*
         * Package Service Providers...
         */

        \Aryxs3m\LaravelHoas\Providers\HomeAssistantProvider::class,
    ])->toArray(),
```

Usage
-----

[](#usage)

First, you need to create your device and it's entities.

### Create devices and entities

[](#create-devices-and-entities)

**Switch entity example:**

```
