Open beta Leyla is free until December 31, 2026. Preorder at founders’ prices

Download

Home Assistant

The Leyla integration for Home Assistant puts every TV that runs Leyla in your home's automations, and your server's sizes, updates and problems beside them. It talks only to your own Leyla server.

Install it

  1. Add it to HACS

    In HACS, open the menu, choose Custom repositories, add github.com/tropicalthink/leyla-home-assistant with the type Integration, and install Leyla. Then restart Home Assistant. It needs Home Assistant 2026.10 or later.

  2. Add your server

    A Leyla server on your home network shows up under Settings › Devices & services as discovered: press Add. Otherwise choose Add integration, pick Leyla and enter the address you open Leyla at, such as http://192.168.1.20:10001.

  3. Sign in with a code

    Home Assistant shows a code. Open your server's /link page on a phone or computer where you are signed in to Leyla, enter the code and approve it. Home Assistant gets its own sign-in, named “Leyla app on Home Assistant” in Your devices, where you can sign it out at any time.

Tip Sign in as an administrator to also get the server's updates, scans, streams and repairs. Anyone else's sign-in gets their TVs and their own libraries.

Your TVs

Every TV that runs Leyla signed in to your account (LG and Samsung, Android TV, Google TV and Fire TV) becomes a device with a media player: what plays, its poster, position and length, play, pause, stop, seek, the next episode, and the volume where the TV owns it.

Browse
Continue watching and every library, down to seasons and episodes, in Home Assistant's media browser. Play anything on the TV from there. A series goes on where you left off.
Search and voice
Search by title or by what a film is about. Voice assistants use the same search: “play Arrival on the living room TV”.
Audio and subtitles
Two pickers per TV switch the track of what plays, from the tracks the TV reports, with Off for subtitles.
In automations
media_player.play_media takes a title's id (what follows /catalog/ in its address in Leyla), or <title id>:<file id> for one file.

A command from Home Assistant controls the TV only for that command and lets go straight after, so the TV does not keep saying it is controlled from Home Assistant. A TV that is off stays as unavailable until it opens Leyla again; one that is gone for good can be deleted from its device page.

Your server

Library sizes
A sensor per library with how many films and series it holds.
Library updated
An event entity that fires when titles in a library are added, changed or removed, for automations such as “tell me when a new film arrives”. The same moment is on the event bus as leyla_library_updated.
Updates
For an administrator: the running version, the newer one, how far its download has got, and Install. Leyla still rehearses the release on your own library before it runs it (Updates).
Scan
For an administrator: a button per library that scans it now.
Streams
For an administrator: Active streams and Active conversions, with the newest ten sessions (who, which device, what, how) as an attribute.
Repairs
For an administrator: what Leyla says needs your attention, such as a nearly full disk or a backup that stopped, appears in Home Assistant's Repairs in Leyla's own words. Set aside there sets it aside in Leyla too (Hear about problems).

When something is wrong

Not discovered
Home Assistant and Leyla must be on the same network, and Leyla's announcement on the home network (5353/udp) must reach it; in Docker that needs the host's network (TVs and the home network). Adding it by address always works.
Asked to sign in again
The sign-in was signed out in Leyla, or went unused for 30 days. Sign in again from the notice; the TVs and entities stay.
The server moved
Choose Reconfigure on the integration and enter the new address. The sign-in stays.
TVs unavailable
Home Assistant lost its connection to Leyla. It tries again by itself, a little less often each time, and writes one line in the log when it is lost and one when it is back.
Something else
Download the integration's diagnostics and open an issue. The diagnostics hold no token, address or names.

Remove it

Delete the integration under Settings › Devices & services. Then, in Leyla, sign out “Leyla app on Home Assistant” under Your devices.