Skip to content

Add option to ignore availability in google calendar events#13714

Merged
syssi merged 7 commits intohome-assistant:devfrom
cgtobi:gcal_all_day
Apr 6, 2018
Merged

Add option to ignore availability in google calendar events#13714
syssi merged 7 commits intohome-assistant:devfrom
cgtobi:gcal_all_day

Conversation

@cgtobi
Copy link
Copy Markdown
Contributor

@cgtobi cgtobi commented Apr 6, 2018

Description:

This implements the transparency feature for google calendars. If for example an all-day event is present but it is set to 'free' HA now skips those events and shows the next. This can be turned on/off per calendar.

ignore_availablilty is optional and defaults to false. It enables/disables whether to respect/ignore the transparency tag which can be opaque (busy) or transparent (free).

Related issue (if applicable): fixes #6076 (only partial)

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#5101

Example entry for configuration.yaml (if applicable):

- cal_id: calendar@googlemail.com
  entities:
  - device_id: calendar
    name: Calendar
    track: true
    ignore_availablilty: true

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

Copy link
Copy Markdown
Member

@syssi syssi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping me if the config is fixed.

Copy link
Copy Markdown
Member

@syssi syssi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for the code clean-up.

@cgtobi cgtobi changed the title Add transparency feature to google calendar component. Add option to ignore availability in google calendar events Apr 6, 2018
@syssi
Copy link
Copy Markdown
Member

syssi commented Apr 6, 2018

Could you check/update the tests? One is failing.

@cgtobi
Copy link
Copy Markdown
Contributor Author

cgtobi commented Apr 6, 2018

Yeah, I just fixed that. Should be working fine now.

@syssi syssi merged commit 48fe2d1 into home-assistant:dev Apr 6, 2018
@cgtobi cgtobi deleted the gcal_all_day branch April 6, 2018 20:06
@balloob balloob mentioned this pull request Apr 27, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Google Calendar - All-Day events block scheduled events that day from being displayed

3 participants