Google calendar scheduler ( doesn't stop automation on PresenceSimulation = OFF

The Google Calendar scheduler works like a charme: all calendar entries are processed as expected.
So I created weekly recurring events in the Calendar, that switch some of my lights on different days of the week and different times on and off. The calendar is filled for the rest of the year so everytime nobody is at home in the evening, the automation simulates our presence. Perfect!

But now after we came back from our easter holidays I wanted to deactivate the automation. Therefore I set the switch PresenceSimulation to OFF (as I have read in the docs:
But the plugin doesn’t stop operating and keeps switching my lights on and off. Any hints for my problem?

These are my log entries after doing a bundle:restart:

2019-04-28 23:33:03.218 [DEBUG] [                 ] - BundleEvent STARTING -
2019-04-28 23:33:03.242 [DEBUG] [] - Google Calendar IO has been started.
2019-04-28 23:33:03.339 [DEBUG] [                 ] - ServiceEvent REGISTERED - {}={, service.bundleid=232, service.scope=bundle,,,} -
2019-04-28 23:33:03.449 [DEBUG] [                 ] - BundleEvent STARTED -
2019-04-28 23:33:03.602 [DEBUG] [] - Loaded credential
2019-04-28 23:33:03.615 [DEBUG] [] - device access token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2019-04-28 23:33:03.618 [DEBUG] [] - device refresh_token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2019-04-28 23:33:03.637 [DEBUG] [] - device expires_in: 1556489663014
2019-04-28 23:33:03.648 [INFO ] [b.core.service.AbstractActiveService] - Google Calendar Event Downloader has been started
2019-04-28 23:33:03.652 [DEBUG] [] - Got calendar SmartHome CalendarID:
2019-04-28 23:33:03.655 [DEBUG] [io.gcal.internal.GCalEventDownloader] - Downloading calendar feed for time interval: 2019-04-28T23:33:03.654+02:00 to  2019-04-29T00:03:03.654+02:00
2019-04-28 23:33:03.678 [DEBUG] [] - Loaded credential
2019-04-28 23:33:03.701 [DEBUG] [] - device access token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2019-04-28 23:33:03.703 [DEBUG] [] - device refresh_token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2019-04-28 23:33:03.706 [DEBUG] [] - device expires_in: 1556489663014
2019-04-28 23:33:04.304 [DEBUG] [io.gcal.internal.GCalEventDownloader] - found 1 calendar events to process
2019-04-28 23:33:04.321 [DEBUG] [io.gcal.internal.GCalEventDownloader] - created new endJob 'Zimmer E' with details 'SchedulerJob [jobKey=C38E4749-D4A6-4E86-B822-DCBEE870DCA3_end, jobGroup=gcal, 1 triggers=[Sun Apr 28 23:55:00 CEST 2019], content=start {
  send OG_Child_Light 50
end {
  send OG_Child_Light 0

I figured out on my own, what the problem here is: It seems as if only calendar entries like this seem to check the “PresenseSimulation” switch:

title: [PresenceSimulation] Schlafzimmer
description: send OG_Bedroom_Light 100

if I use an entry like this, the switch is not tested:

title: [PresenceSimulation] Schlafzimmer
start {
  send OG_Bedroom_Light 100
end {
  send OG_Bedroom_Light 0

Is this “works as designed” or a bug / missing feature?

That’s correct. It’s by design.

How do you come to this comclusion? And what’s the reason for that?
While looking at the code, I would claim, that it’s a bug. So next step would be to try to fix it - I am still struggeling with the build dependencies, but then I plan to do a pull request to fix it…

The reason is that openHab doesn’t known what the end time is. So if you switch on at E.g. 8pm, there’ll be an entry in your calendar:

title: [PresenceSimulation] Light
content: send Light 100

It can’t known when the light turns off (hence the end time is the start time)

If you turn off the light or dim it, there’ll be another entry in your calendar.

I think, you didn’t get my point right: io.gcal supports calendar entries like this:

startTime: 8pm
endTime: 9pm
title:  [PresenceSimulation] Light
start {
  send OG_Bedroom_Light 100
end {
  send OG_Bedroom_Light 0

The GCal plugin parses this entry into 2 separate cron jobs: One to turn the light on (startTime) and another to turn it off again (endTime). But if you use this syntax for your entries, the “[PresenceSimulation]” detection won’t work at the moment. That’s confusing, especially if you create your PresenceSimulation entries by hand, like I do, and don’t let the google persistence plugin create the entries automatically…

I do understand that, but the presence simulation is not designed to be edited manually. So the tag [PresenceSimulation] only works with a single entry, not with start/end.