franc6 / ics_calendar

Provides an ICS (icalendar) platform for the Home Assistant calendar
Apache License 2.0
146 stars 22 forks source link

Location #96

Closed hazze76 closed 1 year ago

hazze76 commented 1 year ago

Is it possible to get the location information from the events in the calendars?

image

franc6 commented 1 year ago

Location info is returned from events already. If you aren’t seeing it, please double-check that whatever you are viewing the entry with will show locations, and if so, please upload a sample file that exhibits the problem (feel free to change the actual location, times, descriptions, etc, to protect your privacy, just be sure it has something reasonable). If you prefer, you can also send me the file via private message on the HA community forum (I’m franc6 there, too). That’ll let me determine where the problem is, and fix it, if it’s in my code, or possibly work around it if it’s not. :) Thanks!

hazze76 commented 1 year ago

Its the built in calendar view in the navigation pane that I'm using, don't know if it has support for locations though..... :)

franc6 commented 1 year ago

The built-in calendar doesn't show the location. I'd suggest making a feature request for HA to do show it. You can verify this integration is setting the location by using the REST API. Using curl, you can do:

curl -s -X GET -H "Authorization: Bearer TOKEN" "http://HA/api/calendars/calendar.NAME?start=START&end=END"

Please change TOKEN in the above command to a long-lived token created in HA. Please change "http://HA" with the base URL of your HA instance. Finally, change "START" and "END" to the date and time values (in UTC!) that include the events you want to verify. Use the format: "yyyy-MM-ddTHH:mm:ssZ". E.g. if you want to specify a date of January 25, 2023 at 4:23pm UTC, then use "2023-01-25T16:23:00Z".

(and yes, that's how I verify it's working in context, if HA's UI doesn't show everything. :) )