- 
                Notifications
    You must be signed in to change notification settings 
- Fork 59
Description
I've had an ongoing issue where the context is not passed to service.call in my scripts - i.e. the logbook for a light turned on by a script or automation just reads like follows instead of including the extra information about what called it:
MyLamp turned on triggered by action Light: Turn on
But as of d0745ea I understand that the context should be automatically passed into the service.call method by the function update inside pyscript.function.Function that maps over the Function.service_call method:
        cls.functions.update( { ... "service.call": cls.service_call, ... } )
Any ideas why this is not being passed through correctly? What's more is the function update of service.call seems not even to be applied, because if I explicitly pass in an example context={} to service.call I get the following error message:
Exception in <file.my_functions.light_store> line 110: service.call(self.domain(), action, context={}, **service_data) ^ MultipleInvalid: extra keys not allowed @ data['context']
So it seems that service.call doesn't want to accept a context kwarg either, let alone not populating it automatically.