Template cookbook
The Entity Status widget can show the result of a Home Assistant template: a sentence built from your sensors, like “Washer: Idle for 2 hr”. You do not need to know how to write one. Start with the helper buttons, or copy a recipe below.
Put the device’s id in quotes inside states(). Add its unit if it has one.
Shows: 21.5 °C
time_since() turns the moment a device last changed into words. The 2 means two units, like 1 hour 5 minutes.
Shows: 2 hours 5 minutes
An if chooses between two messages. Every if needs an endif at the end.
Shows: Front door is closed
float turns text into a number and round trims it. title capitalises a word.
Shows: 22 Idle
Count every light that is on, or every door that is open, in the whole house.
Shows: 3
Put two stars on each side of words to make them bold, like **Idle**. A new line in the box is a new line on the display.
Change the device names in the code to your own. The Step by step helper and the Inspect button will find them for you.
Two machines, how long each has been in its state, and a reminder to move the laundry along.
The door’s state and how long it has been that way.
How many doors are open right now.
How many lights are on in the house.
The names of everyone Home Assistant says is home, or “Nobody”.
Two sensors on one line, rounded.
Say one thing while something is on and another when it is off.
Compare a sensor with a limit and show a reminder when it is crossed.
The device id is not quite right, or the device is offline in Home Assistant. The helper under the box names any id that Home Assistant does not have and suggests the closest one.
The helper explains Home Assistant’s errors in plain English. The usual causes are a missing } or %}, an if without its endif, or a misspelled word after a | .
The display asks Home Assistant again about every 8 seconds, so a change shows within roughly 10 to 15 seconds.
Use the Insert or Inspect buttons: they list your devices with their current values. In Home Assistant the same ids are under Settings → Devices & services → Entities.
Yes, anything Home Assistant can render, up to 2,000 characters in and 1,000 out. The only formatting Piazza HQ adds is **bold** and line breaks.
No. Piazza HQ sends it to your own Home Assistant, which renders it. Nothing goes to piazzahq.com.
Looking to control Piazza HQ from Home Assistant instead? See Home Assistant Control.