CCOSTAN / Home-AssistantConfig

:house: Home Assistant configuration & Documentation for my Smart House. Write-ups, videos, part lists, and links throughout. Be sure to :star: it. Updated FREQUENTLY!
https://www.vCloudInfo.com
Other
4.8k stars 503 forks source link

Create First IOS action script. #168

Closed CCOSTAN closed 7 years ago

CCOSTAN commented 7 years ago

This looks AMAZING..

https://home-assistant.io/docs/ecosystem/ios/notifications/actions/

CCOSTAN commented 7 years ago
ios:
  push:
    categories:
      - name: Medicine
        identifier: 'TABLET'
        actions:
          - identifier: 'TABLET_TAKEN'
            title: 'Tablet Taken'
            activationMode: 'background'
            authenticationRequired: yes
            destructive: yes
            behavior: 'default'
          - identifier: 'REMIND_LATER'
            title: 'Remind me later'
            activationMode: 'background'
            authenticationRequired: yes
            destructive: no

input_boolean:
  tablet_reminder:
    name: Tablet Reminder
    initial: on
    icon: mdi:tablet

automation:
  - alias: Tablet Already taken
    trigger:
      platform: event
      event_type: ios.notification_action_fired
      event_data:
        actionName: TABLET_TAKEN
    action:
      - service: notify.ios_suresh
        data:
          message: "Great job!"
      - service: input_boolean.turn_off
        entity_id: input_boolean.tablet_reminder          

  - alias: Remind Me Later
    trigger:
      platform: event
      event_type: ios.notification_action_fired
      event_data:
        actionName: REMIND_LATER
    action:
      - service: notify.ios_suresh
        data:
          message: "Will remind you in a few minutes !"

  - alias: Trash and Recycle Pickup Reminder
    initial_state: true
    trigger:
      - platform: time
        minutes: '30'
        seconds: '00'
    condition:
      condition: and
      conditions:
      - condition: template
        value_template: '{{ states.input_boolean.tablet_reminder.state == "on" }}'
    action:
      - service: notify.ios_suresh
        data:
          title: "Tablet Time"
          message: "Please take te tablet!"
          data:
            push:
              category: "TABLET"
            action_data:
              entity_id: foo
              my_custom_data: bar
CCOSTAN commented 7 years ago

https://github.com/torn8o/Home-AssistantConfig/blob/master/packages/ios_plug_in_play.yaml

skalavala commented 7 years ago

Why are you notifying Suresh when it is time to take your medicine? 🤣

CCOSTAN commented 7 years ago

Meanwhile @skalavala, Months later and I STILL haven't implemented this!

skalavala commented 7 years ago

LOL

CCOSTAN commented 7 years ago

https://github.com/cribbstechnologies/ha_config/blob/master/packages/dash_buttons/flonase_reminder.yaml @BRIANCRIBBS

CCOSTAN commented 7 years ago

https://www.youtube.com/watch?v=Iu0NwY9QOCo