Download the PHP package mapo-89/laravel-homeassistant-api without Composer

On this page you can find all versions of the php package mapo-89/laravel-homeassistant-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-homeassistant-api

🚀 Laravel Homeassistant API

Latest Version on Packagist Total Downloads GitHub Actions

A simple Laravel integration for the Homeassistant API. This package provides a clean interface to interact with the API.

📖 This README is also available in 🇩🇪 German.


📦 Installation

Install the package via Composer:

Add your API token to your .env file:

⚡️ Dynamic configuration (URL & token at runtime)

In addition to static configuration via config/homeassistant.php, this package also supports dynamic configurations at runtime. This is useful, for example, if each user has their own Home Assistant token or if the instance URL is to be set dynamically.

Optionally, you can publish the config file:


⚙️ Usage

📚 The complete API documentation can be found here: home-assistant.io

Initialization


🔄 System API


🔄 Config API


🔄 States API


🧩 Template API

More information about templating


🔔 Events API

Interaction with the Home Assistant event system.

Supported endpoints


🕒 History API

Access historical state changes of entities.

Flat output (ideal for charts & analytics)

Supported endpoints


📒 Logbook API

Access the Home Assistant logbook – ideal for user activities, automations, and system events.

⚠️ The logbook API requires at least one entityId.

Supported endpoint


Query Builder API (States)

Home Assistant does not support server-side filtering of states. This package therefore provides a query builder-like API that can be used to filter states on the client side – inspired by Laravel Eloquent.


✨ Example


🧱 Available query methods

whereDomain(string $domain)

Filters by the domain of an entity (e.g., light, sensor, switch).


whereState(string $state)

Filters by the state of an entity (e.g., on, off, unavailable).


whereEntityIds(array $entityIds)

Filters by a list of specific entity IDs.


whereAttribute(string $key, mixed $value)

Filters by attributes of an entity.


get()

Returns all filtered states as an array of State DTOs.


first()

Returns the first matching state or null.


Artisan Command

The following Artisan commands always use the static configuration from .env or config/homeassistant.php:


📒 Changelog

Please see CHANGELOG for recent changes.


🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING for details.


🔐 Security

If you discover any security issues, please do not use the issue tracker. Instead, email us directly at [email protected].


👥 Credits


📄 License

The MIT License (MIT). Please see the License File for more information.


🛠️ Laravel Package Boilerplate

Generated using the Laravel Package Boilerplate.


All versions of laravel-homeassistant-api with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mapo-89/laravel-homeassistant-api contains the following files

Loading the files please wait ...