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

FEATURE REQUEST - add additional attributes #44

Closed
glassbase opened this issue Feb 15, 2022 · 8 comments
Closed

FEATURE REQUEST - add additional attributes #44

glassbase opened this issue Feb 15, 2022 · 8 comments
Labels
duplicate This issue or pull request already exists

Comments

@glassbase
Copy link

glassbase commented Feb 15, 2022

HA calendar entities support additional attributes such as message, location, description, start_time and end_time attributes, etc.

Currently your component does not populate them. It would be awesome if you could add those. We could use this additional info to display calendar events start times, etc on dashboards.

(I only tested Google Calendar, but it appears to populate the start_ and end_time and the other attributes with the details of the current or next calendar event.)

Examples in documentation: CalDAV and Google.

@franc6
Copy link
Owner

franc6 commented Feb 15, 2022 via email

@glassbase
Copy link
Author

glassbase commented Feb 16, 2022

Maybe it is my ICS sources?

calendar:
  - platform: ics_calendar
    calendars:
      - name: "Juve (Serie A)"
        url: "https://api.thescore.com/seri/teams/6.ics"

All attributes on the calendar entity:

friendly_name: Juve (Serie A)

@glassbase
Copy link
Author

Whereas, a Google Calendar entity (using the official Google Calendar integration), populates much more attributes:

message: Blue Jays @ Orioles
all_day: false
start_time: '2022-03-31 15:05:00'
end_time: '2022-03-31 18:05:00'
location: ''
description: ''
offset_reached: false
friendly_name: Toronto Blue Jays

@glassbase
Copy link
Author

glassbase commented Feb 16, 2022

HANG ON, Looks like I somehow have 2 custom integrations for ICS. I appear to be using the other dev's (ics vs ics_calendar)

EDIT - switched over to your custom component and seeing same results.

@glassbase
Copy link
Author

So to clarify, the calendar works. It shows in the HA calendar menu with all the events at the proper dates and times.

All I am really talking about is (hopefully) -- adding the additional attributes to the calendar entity.

@franc6 franc6 added the duplicate This issue or pull request already exists label Feb 17, 2022
@franc6
Copy link
Owner

franc6 commented Feb 17, 2022

Thanks! I understand, now. This is the same as issue #43. If an event were actually taking place (i.e. offset_reached is true), you'd see the other attributes. You could also try switching the parser to icalevents, but that could introduce other issues, too. The reason I suggest icalevents is that it will return the "next" event, no matter how far in the future and you'll see all the attributes as you expected. This functionality is something I just haven't had time to implement, once I realized the new parser doesn't behave the same as icalevents in that regard.

@franc6 franc6 closed this as completed Feb 17, 2022
@glassbase
Copy link
Author

Thanks. Changing parser worked

@franc6
Copy link
Owner

franc6 commented Mar 1, 2022

@glassbase Please note version 2.6.0 adds a new "days" option for this purpose. Set it to something greater than 1, you may need to experiment a little or look at how far apart your events tend to be. Please note, too, that with version 2.6.0 using the icalevents parser will require the use of the new days option, as it now returns data in the same manner as the other two parsers. I recommend removing the parser option and setting the days option with this update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants