项目作者: rt400

项目描述 :
高级语言: Python
项目地址: git://github.com/rt400/Jewish-Sabbaths-Holidays.git
创建时间: 2020-09-13T10:00:01Z
项目社区:https://github.com/rt400/Jewish-Sabbaths-Holidays

开源协议:

下载


hacs_badge

Jewish Sabbaths and Holidays Times integration for Home-Assistant

The Jewish-Sabbaths-Holidays platform uses the HebCal API to receive Shabbat times and the times of Jewish holidays, as well as the Hebrew date and the names of Jewish holidays (chagim).

Installation

To install the integration, first download all the files in this folder: https://github.com/rt400/Jewish-Sabbaths-Holidays/tree/master/custom_components/hebcal.

Then create a folder called hebcal in your HomeAssistant config/custom_components folder and copy all files that you already download.

In order to display the correct times, the sensor needs your geolocation. By default it receives this from the instance’s configuration.yaml.

You can configure your geolocation as follows:

  1. homeassistant:
  2. latitude: 32.0667
  3. longitude: 34.7667
  4. time_zone: Asia/Jerusalem

If you don’t know your geocoordinates, you can find them here.

The sensor also requires TimeZone to work.

To install using HACS (Home Assistant Community Store), add this repository to your HACS custom repositories and select type -> integration.

When it shows up, click Install.

Configuration

To enable hebcal times , just add the following lines to your configuration.yaml:

  1. # Example configuration.yaml entry
  2. sensor:
  3. - platform: hebcal
  4. resources:
  5. - shabbat_in
  6. - shabbat_out

Optional Configuration Variables

You can configure the time for havdala and the time for the entry of Shabbat by modifying the following parameters:

  • havdalah_calc # By default this is set to 42 minutes. You can also configure this value to be 50 minutes, 70 minutes, 72 minutes, or some other value.

  • time_before_check # By default this is set to 10 minutes. You can modify the value in minutes.

  • time_after_check # By default this is set to 10 minutes. You can modify this value.

  • jerusalem_candle # By default this value is set to ‘False’. To enable Jerusalem candle lighting time (40 minutes before Shabbat), change the value to ‘True’.

  • tzeit_hakochavim # By default this is set to ‘True’. If it is set to false, the sensor uses the time set for havdala.

  • omer_count_type # By default this is set to 0. 1 configures the omer counting method to follow the Yemenite/Teimani tradition. 2 is Ashkenazi and Sephardic.

  • language # By default this is set to Hebrew. But you can choose to display values in one of the supported languages by specifying the language (the options are: English, Hebrew, German, Spanish, French, Russian, Polish, Finish, Russian, and Hungarian).

  • resources: # Mandatory - You need to select at least one resource for the integration to work correctly.

  1. - shabbat_in # get shabbat entrace
  2. - shabbat_out # get shabbat exit
  3. - parasha # get parashat haShavoh
  4. - hebrew_date # get the hebrew date on every day (changed in 00:00)
  5. - is_shabbat # get if shabbat or not by True or False.
  6. - yomtov_in # get yomtov entrace
  7. - yomtov_out # get yomtov exit
  8. - is_yomtov # get if yomtov or not by True or False.
  9. - yomtov_name # get yomtov name.
  10. - event_name # get event name.
  11. - omer_day # get omer name.
  12. - zmanim # get zmanim for the current day

Full configuration example

The following sample configuration shows a configuration with all the resources loaded:

  1. # Example configuration.yaml entry
  2. sensor:
  3. - platform: hebcal
  4. havdalah_calc: 42
  5. time_before_check: 10
  6. time_after_check: 1
  7. jerusalem_candle: False
  8. tzeit_hakochavim: False
  9. omer_count_type: 0
  10. language: english
  11. resources:
  12. - shabbat_in
  13. - shabbat_out
  14. - parasha
  15. - hebrew_date
  16. - is_shabbat
  17. - yomtov_in
  18. - yomtov_out
  19. - is_yomtov
  20. - yomtov_name
  21. - event_name
  22. - omer_day
  23. - zmanim

Good Luck !