My automation file no working

Nothing is happening when i arrive home can some one look over my file

- action:
  - alias: 'Open Garage '
    data:
      entity_id: cover.garage_door_opener
      position: 100
    service: cover.open_cover
  alias: 'Garage Open when i get home '
  id: '1502394395998'
  trigger:
  - entity_id: device_tracker.pi_frank
    from: 'not_home'
    platform: state
    to: 'home'
- action:
  - alias: 'Garage Lights ON '
    data:
    entity_id:
      - light.garage_left
      - light.garageright
    service: light.turn_on
  alias: 'Garage Door Lights ON when i Arrive '
  id: '1502395359727'
  trigger:
  - entity_id: device_tracker.pi_frank
    from: 'not_home'
    platform: state
    to: 'home'

Can you format using the preformatted text button above?

1 Like

How did you even end up whit this format?

Automation Basics

Are you trying to open the garage door when you arrive home then turn on the garage light when the door opens?

2 Likes

YES, and I use the automation tool inside Homeassisant

I just did, sorry I’m new to all of this lol

You need something like this. Not sure how HA even started with the format you had. It needs to follow Trigger, Condition, Action with proper indents. Also, you can add multiple actions to a trigger. Try this…

   - alias: 'Garage Open when i get home'
      id: '1502394395998'
      trigger:
        platform: state
        entity_id: device_tracker.pi_frank
        from: 'not_home'
        to: 'home'
      action:
        - service: cover.open_cover
          entity_id: cover.garage_door_opener
          data:
            position: 100
        - service: light.turn_on
          entity_id:
            - light.garage_left
            - light.garageright

when I run the automation the lights comes on but the garage does not open, I just check and I’m not able to control the garage with Home assistant. It’s a Myq and a WINK. It works in the wink app but not in homeassistant.

I found this error
2017-08-11 23:20:37 ERROR (MainThread) [homeassistant.core] Invalid service data for cover.open_cover: extra keys not allowed @ data[‘position’]. Got 100

Wink?

Why not just ad the MyQ to Homeassistant bypassing Wink?

1 Like

You can try taking the data and position lines out. But I think Wink won’t let you open the garage door. Im pretty sure I use the MyQ component directly too but not at my computer now to verify.

But I’d also be careful about opening your garage door every time you are “home”. Depending on what you use for device_tracker you may find it just opens it when you don’t want it to, such as if your phone turns off then back on in the middle of the night. You may want to rethink and add some conditions so it doesn’t trigger all the time.

2 Likes

YEs, i can add the Myq separate, I had it before but there were two instances of the garage lol. I guess I can hide the WINK one. Good point JER, maybe I can add a condition to the time I leave from work. This is FUN lol, I’m waiting on a couple of fire alarm from xioami and sensor to add alarm

Also you may want to setup an automation that alerts you if you left the garage door open too long, or one to automatically close it after x mins. I have one I can post here for you next time I’m at my computer.

Another trick you may use in your component setup is

entity_namespace: myq

This will turn cover.garage_door into cover.myq_garage_door. This way if you leave the wink instance of it you can easily differentiate the two.

Everything is working now

THank you, now i need to figure out htm5 notification lol.

I like entity_namespace: makes it easy to manage my stuff

One more question, I’m done setting Notification but can I have the android html5 and IOS working at the same time I can only seem to have one or the other below is what I have configured, if I remove the IOS the Android HTML5 works but no the iPhone lol

notify:
  platform: html5
  gcm_api_key: 'Secret"
  gcm_sender_id: 'Secret'
  
  platform: ios
  target: Secret

Yes, you can. You just have to hyphen in between platforms like this:

notify:
  - platform: html5
    gcm_api_key: “Secret”
    gcm_sender_id: “Secret”
  - platform: ios
    target: “Secret”

Thank you sir, im all set now.

No problem. I’ll send you my automation for notifications soon if you still need them. Haven’t been at my computer for awhile but I will get them to you soon!!

Sorry for the delay…I haven’t had much time lately at my computer. Here’s the automation and script I have for notifications on my garage door. This is for iOS notifications but you can also modify for any other type like PushBullet. Basically as soon as the garage door opens, it starts the script and has a 15 minute delay before it sends the notification. If the garage door closes during that time, it cancels the script and notification.

Put this in your automation section:

  - alias: 'Garage door still open'
    initial_state: on
    trigger:
      platform: state
      entity_id: cover.myq_garage_door
      from: 'closed'
      to: 'open'
    action:
      service: script.turn_on
      entity_id: script.garage_door_alarm
      
  - alias: 'Garage door closed'
    initial_state: on
    trigger:
      platform: state
      entity_id: cover.myq_garage_door
      from: 'open'
      to: 'closed'
    action:
      service: script.turn_off
      entity_id: script.garage_door_alarm

And this in the script area:

  garage_door_alarm:
    alias: "Garage door alarm"
    sequence:
      - delay:
          minutes: 15
      - service: notify.all_ios
        data:
          message: "Garage Door is Open"
          data:
            push:
              badge: 1
              sound: "US-EN-Alexa-Garage-Door-Opened.wav"
              category: camera
            entity_id: camera.garage
            action_data:
              category: 'GARAGEDOOR'
1 Like

Thanks Jer, i will make good used of this lol