Template in Home Assistant
template
part of Home Assistant since 0.12
The Template integration allows creating virtual entities in Home Assistant using customizable templates. It connects with various components by generating entities like sensors, switches, or climate controls based on user-defined logic. Typically used for advanced automation, custom dashboards, and integrating non-standard devices.
Typical uses
- Custom sensors
- Automations
- Virtual controls
- Data aggregation
Facts about this integration
- Compatible with Home Assistant
- yes, official integration
- Connection
- Local, push – Talks to the device on your own network and is told about every change straight away.
- Setup
- in the user interface
- Kind
- Helper
- Quality scale
- Internal – Part of Home Assistant itself, not rated separately.
- Installations
- 221,290 (30.9 % of the installations that share statistics)
- Categories
- Alarm control panel, Binary sensor, Button, Climate, Cover, Device tracker, Event, Fan, Helper, Image, Light, Lock, Number, Select, Sensor, Switch, Update, Vacuum, Weather
- Provides
- Alarm control panel, Binary sensor, Button, Climate, Cover, Device tracker, Event, Fan, Image, Light, Lock, Number, Select, Sensor, Switch, Update, Vacuum, Weather
- Maintained by
- @Petro31, @home-assistant/core
Setup
- In Home Assistant open Settings → Devices & services.
- Click "Add integration" and search for Template.
- Follow the dialog – it asks for everything the integration needs.
The link goes through my.home-assistant.io and opens the setup dialog in your own instance – no address of ours is involved.
Blueprints that use this integration
- Script Devices Schedules Controller – Manages device schedules with scripts, sensors, and TTS using shell commands and automation.
- Automation Send alerts using Telegram – Sends Telegram alerts using event triggers and sensor data.
Known issues and fixes
11 open issues and 45 bug fixes in the last twelve months are recorded for Template in the Home Assistant issue tracker. If something does not work, update first: the most recent fix shipped with Home Assistant 2026.10.0.
Open
- open Different platforms in the Template Integration may behave inconsistently
- open Template light cannot use temperature values in Kelvin
- open Editing templates triggers unnecessary error logs
- open Testing template triggers lacks proper simulation tools
- open Template entities may incorrectly assume requirements are met
- open Old weather template configurations are no longer supported
- open The visual editor cannot configure transition support for template lights
- open Common attributes in sensors and other entities are being phased out
Fixed
- fixed in 2026.10.0 Template outputs are now properly converted to strings for list comparisons
- fixed in 2026.9.0 Template sensors no longer show incorrect capability/state attributes
- fixed in 2026.8.0 Template covers, trackers, and fans now handle missing restore data better
- fixed in 2026.6.0 Device tracker zone options now display correctly in all languages
- fixed in 2026.5.0 Template reloads now work more reliably
- fixed in 2026.5.0 Uptime sensors using templates now show accurate values
- fixed in 2026.5.0 Vacuum template configurations now use correct naming for clean area
- fixed in 2026.4.3 Template binary sensors no longer lose device class information
- fixed in 2026.3.4 Scripts in template entities now validate correctly
- fixed in 2026.3.1 The 'this' variable now works properly in template configuration previews
- fixed in 2026.3.0 Template entity previews in the UI now show correct variable values
- fixed in 2026.3.0 Template sensors now handle integer and float values correctly
Source: the issue tracker of Home Assistant, as of October 25, 2026. The sentences are written by a language model from the titles of the issues; the reports themselves are on GitHub.
Check a specific device for known problems in the product check →
Source of this entry: the official documentation of the integration
The description was written by a language model from the facts listed here, not taken from the documentation.
