A server for my Home Assistant, installed as a RESTful binary sensor to automate home appliances using a calendar.
The server is distributed as a very slim docker image that allows easy installation and integration in home servers.
Unfortunately, the refresh rate of the different calendars are ~15min. This can create major delays and issues, especially when cancelling an automation in the last minute.
Google allows using ical calendars that are protected behind a private URL. This is easier than integrating a calendar with the entire OAuth flow.
Accepts JSON with the format of:
{
"urls": {
"calendar_name_a": "https://url",
"calendar_name_b": "https://url"
// ...
}
}And returns the following payload:
{
"calendar_name_a": true,
"calendar_name_b": false
// ...
}where true means "busy", and false means "free".
binary_sensor:
- platform: rest
name: boiler_calendar_busy
scan_interval: 60
resource: https://ical-sensor.my-home.server/by_url
method: POST
payload: |
{"urls": {"boiler": "MY_ICAL_URL" }}
value_template: "{{ value_json.boiler }}"