Skip to content

Instantly share code, notes, and snippets.

@danielrosehill
Last active May 16, 2025 15:45
Show Gist options
  • Save danielrosehill/acb50c134b146db70570297f90eced04 to your computer and use it in GitHub Desktop.
Save danielrosehill/acb50c134b146db70570297f90eced04 to your computer and use it in GitHub Desktop.

Is It Yom Tov? (Binary Sensor Downstream Of Jewish Sabbath Holidays Home Assistant Integration)

This template binary sensor provides a binary condition for the isYomtiv sensor in the Jewish Sabbath Holidays Home Assistant plugin which reports either No Info (false) or the Yom Tov name (true).

To simplify using this sensor in automations, this template sensor converts it to a binary based on simple logic interpretation.

Description

Template binary sensor for Yomtov detection in Home Assistant using sensor.hebcal_is_yomtov from rt400/Jewish-Sabbaths-Holidays

YAML

# Binary Sensor: Is it Yomtov?
#
# This binary sensor is designed for Home Assistant and uses the output of
# the Jewish calendar sensor `sensor.hebcal_is_yomtov`, provided by:
# https://github.com/rt400/Jewish-Sabbaths-Holidays
#
# The original sensor provides a text value indicating the name of the holiday
# if it is Yomtov (e.g. "Shavuot", "Sukkot") or "No Info" otherwise.
#
# This template converts that into a proper boolean (binary) sensor, useful
# for automations, dashboards, etc.

- platform: template
  sensors:
    is_yomtov_binary:
      friendly_name: "Is Yomtov?"
      value_template: >-
        {{ not is_state('sensor.hebcal_is_yomtov', 'No Info') }}
      icon_template: >-
        {% if not is_state('sensor.hebcal_is_yomtov', 'No Info') %}
          mdi:candle
        {% else %}
          mdi:calendar-remove
        {% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment