Multiple Entities in App

Hi,
Have being trying to get my app to accept multiple entities (lights) so they can all be changed at the same time.
my Apps.yaml is this

notify_door_open_closed_front:
  module: notify_door_open_closed
  class: NotifyDoorOpenClosed
  door : binary_sensor.door_window_sensor_158d0001e59f03
  notifymessage: "The Front Door "
  lights:
    - light.study_strip_light
    - light.family_color_light

I am looping through as per the example in Docs ie:

class NotifyDoorOpenClosed(appapi.AppDaemon):

  def initialize(self):
    # Subscribe to sensors
    self.listen_state(self.doorChangeDected, self.args["door"])

    
  def doorChangeDected(self, entity, attribute, old, new, kwargs):

    if new == "on" or new == "open":
      state = "open"
    else:
      state = "closed"

    if state == "open":
        self.log("{} has opened".format(self.args["door"]))
        self.call_service("notify/notify", message = self.args["notifymessage"]+ "is really Open")
        for light in self.args.lights:
          self.turn_on(light,effect = "twinkle")
    if state == "closed":
        self.log("{} has closed".format(self.args["door"]))
        self.call_service("notify/notify", message = self.args["notifymessage"]+ "is really Closed")
        for light in self.args.lights:
          self.turn_off(light)

I am getting this erorr in logs

2018-02-10 18:24:14.721629 WARNING Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 512, in worker
    utils.sanitize_state_kwargs(args["kwargs"]))
  File "/config/appdaemon/apps/notify_door_open_closed.py", line 35, in doorChangeDected
    for light in self.args.lights:
AttributeError: 'dict' object has no attribute 'lights'

Everything works well if I have single Light defined and remove the For loop, but can’t get this working with multiple entities.
I am using AppDaemon 2

Not sure, but I think you need self.args["lights"]

the spaces behind door could make the yaml invalid. (not sure if it would, but with yaml you need to be very straight.)
if so then the parts in the yaml behind it could be unnoticed.
but also what @VDRainer all said i only use that way to get args.

I removed the spaced behind door but still no joy.
The pushbullet notification is working fine, So everything is working uptil that point
I was following the reference here in the docs
http://appdaemon.readthedocs.io/en/stable/APPGUIDE.html#passing-arguments-to-apps

If i use the self.args[“lights”] argument I get nothing either unless i only have one light (entity) next to lights: in the apps .yaml

for light in self.args["lights"]:
    self.turn_off(light)

should work if the yaml is correct like this:

  lights:
    - light.study_strip_light
    - light.family_color_light

i dont know which AD version you use, but if you have unexpected problems after you have changed something then dont forget to restart appdaemon completely, to make sure you have things correctly in memory.