# How to setup Shabbat candle time announcement with Home Assistant Automation — Liran Tal

Fun and useful automation for Shabbat observant families to announce the candle lighting time using Home Assistant.

Canonical: https://lirantal.com/blog/how-to-setup-tv-sleep-timer-with-home-assistant-automation

For Shabbat observant families, the time for lighting the candles is an important ritual. It should be done very close in time to when Shabbat enters. I already have a Home Assistant integration that shows up Shabbat times so it can help automate this process, ensuring that an announcement is made at the right time every week. Here’s how to set it up.

To build this integration I relied on the following helpful resources:

*   Blog post on [Setting up Shabbat Automation](https://medium.com/daniels-tech-world/smart-home-shabbat-automation-with-home-assistant-v1-7595713f067d)
*   [Shabbos mode discussion on Home Assistant Community](https://community.home-assistant.io/t/shabbos-mode/248182/10)
*   Various automation examples from [this blog post on Yom Tov and Shabbos Automation](https://heyitworks.tech/blog/home-assistant-automations-for-yom-tov-shabbat-observance/#create-your-scenes-for-various-shabbat-times)

Pre-requisites:

*   You have Home Assistant installed and running.
*   You have the `Jewish Sabbaths Holidays` integration installed and configured in Home Assistant: [https://github.com/rt400/Jewish-Sabbaths-Holidays](https://github.com/rt400/Jewish-Sabbaths-Holidays)

## The Shabbat Candle Time Announcement Home Assistant Automation

Here’s the full automation setup in Home Assistant:

![home assistant shabbat candle time announcement automation](/images/blog/home-assistant-shabbat-candle-time-announcement-automation.png)

The code involved is the following. First, we setup the trigger:

```
{{ (as_timestamp(strptime(states('sensor.hebcal_shabbat_entry'), '%H:%M')) - as_timestamp(now()) | int) <= 300 and (as_timestamp(strptime(states('sensor.hebcal_shabbat_entry'), '%H:%M')) - as_timestamp(now()) | int) > 0 }}
```

Notice that it requires you actually have setup and integrated the `Jewish Sabbaths Holidays` integration which provides the `sensor.hebcal_shabbat_entry` sensor (you need to define it in your `configuration.yaml` file). If it’s called something else or you defined it somehow different, adjust the above YAMl template for the trigger accordingly.

Next, the condition:

```
{{ now().weekday() == 4 }}
```

This condition checks that today is Friday, which is when Shabbat starts.

Finally, the action to announce the candle lighting time. Here is the YAML version of the action that you see in the screenshot above:

```
action: tts.speak
data:
  cache: true
  message: >-
    Dear residents of the Tal family. Shabbat about to start. Shabbat about to
    start. Shabbat about to start. Shabbat Shalom Lekuuulam.
  media_player_entity_id: media_player.living_room_tv
target:
  entity_id: tts.google_translate_en_com
```

## More Home Assistant

You might find these other Home Assistant related articles useful too:

*   [How to setup TV Sleep Timer with Home Assistant Automation](https://lirantal.com/blog/how-to-setup-tv-sleep-timer-with-home-assistant-automation)
*   [How to block LAN clients from accessing YouTube and other media with AdGuard and Home Assistant](https://lirantal.com/blog/block-lan-clients-from-accessing-youtube-and-other-media-with)
*   [How I Deployed Tailscale VPN to Securely Access Home Assistant Remotely](https://lirantal.com/blog/employ-tailscale-vpn-to-securely-access-home-assistant-remotely)

## More writing

[All writing →](/blog)

*   Sep 5, 2026

    ### [Self-Hosting Hermes Agent with Matrix E2EE on Proxmox](/blog/self-host-hermes-agent-matrix-e2ee-proxmox)

*   Aug 2, 2026

    ### [The Practical Second Brain: Building an LLM-Operated Markdown Knowledge Graph](/blog/practical-second-brain-llm-markdown-knowledge-graph)

*   Aug 1, 2026

    ### [Building a Second Brain with LLMs and AI Agents](/blog/building-second-brain-llms-ai-agents)


* * *

Liran Tal is the author of the book [Node.js Secure Coding: Defending Against Command Injection Vulnerabilities](https://www.nodejs-security.com/)

[Start Building Secure Node.js Applications ↗](https://www.nodejs-security.com/)

 [![](/_astro/nodejs-secure-coding-book-3d-style.DiTWpzFs_Z3c7s1.png)](https://www.nodejs-security.com/)
