Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ferien-api.de url not available #10

Open
StefanW86 opened this issue Nov 28, 2023 · 9 comments
Open

ferien-api.de url not available #10

StefanW86 opened this issue Nov 28, 2023 · 9 comments

Comments

@StefanW86
Copy link

Hello,

since today there seems to be an issue with the url ferien-api.de. The url is not reachable anymore.

@CoolID2
Copy link

CoolID2 commented Dec 4, 2023

I've got same problem. All cover automations stopped working.
Help please.

@tombrain
Copy link

tombrain commented Dec 4, 2023

Perhaps it is possible to change to datasource https://openholidaysapi.org/

@stsch83
Copy link

stsch83 commented Dec 6, 2023

Perhaps it is possible to change to datasource https://openholidaysapi.org/

i use this for the moment:

sensor:
  - platform: rest
    resource: https://openholidaysapi.org/SchoolHolidays?countryIsoCode=DE&languageIsoCode=DE&validFrom={{ now().strftime('%Y-%m-%d') }}&validTo={{ now().strftime('%Y-%m-%d') }}&subdivisionCode=DE-TH
    method: GET
    name: openholidayapi_ferien_th
    value_template: >
      {% if value_json["name"]  %}
      true 
      {% else %}
      false 
      {% endif %}
    scan_interval: 10

The sensor look for the current day for Thuringia in Germany.

@tombrain
Copy link

tombrain commented Dec 7, 2023

Perhaps it is possible to change to datasource https://openholidaysapi.org/

i use this for the moment:

sensor:
  - platform: rest
    resource: https://openholidaysapi.org/SchoolHolidays?countryIsoCode=DE&languageIsoCode=DE&validFrom={{ now().strftime('%Y-%m-%d') }}&validTo={{ now().strftime('%Y-%m-%d') }}&subdivisionCode=DE-TH
    method: GET
    name: openholidayapi_ferien_th
    value_template: >
      {% if value_json["name"]  %}
      true 
      {% else %}
      false 
      {% endif %}
    scan_interval: 10

The sensor look for the current day for Thuringia in Germany.

this sensor do not work

here is an working replacement as binary sensor like original


  - platform: rest
    name: openholidayapi_ferien_by_binary # today
    resource_template: >
      https://openholidaysapi.org/SchoolHolidays?countryIsoCode=DE&languageIsoCode=DE&validFrom={{ now().strftime('%Y-%m-%d') }}&validTo={{ now().strftime('%Y-%m-%d') }}&subdivisionCode=DE-BY
    value_template: "{{ not value_json[0].id is none }}"
    scan_interval: 300
  - platform: rest
    name: openholidayapi_ferien_by_morgen_binary #tomorrow
    resource_template: >
      https://openholidaysapi.org/SchoolHolidays?countryIsoCode=DE&languageIsoCode=DE&validFrom={{ (now() + timedelta(days=1) ).strftime('%Y-%m-%d') }}&validTo={{ (now() + timedelta(days=1) ).strftime('%Y-%m-%d') }}&subdivisionCode=DE-BY
    value_template: "{{ not value_json[0].id is none }}"
    scan_interval: 300

@phil11c
Copy link

phil11c commented Dec 9, 2023

ferien-api.de seems to be back online

@ecdlguy
Copy link

ecdlguy commented Mar 26, 2024

@tombrain very nice, could this rest-call be used to create a home assistant (local) calendar "on the fly"?

@tombrain
Copy link

@tombrain very nice, could this rest-call be used to create a home assistant (local) calendar "on the fly"?

@ecdlguy can you describe your situation? what do you mean "on the fly"?

@ecdlguy
Copy link

ecdlguy commented Mar 26, 2024

what do you mean "on the fly"?

I'm trying to have a "school holiday" calendar in home assistant that automatically keeps up-to-date.

Using the REST platform one can fetch school holidays for an entire year for example. I'm not an expert regarding home assistant templates, but maybe it's possible to create events for e.g. a local calendar from the REST response?

@tombrain
Copy link

@ecdlguy
You can still use the REST interface to query whether a particular day is a vacation or not.

If you want an annual calendar with all vacations, you may have to go via the Google calendar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants