#Wheelchair Charger status and Notifications

1 messages · Page 1 of 1 (latest)

low glen
#

I am working on trying to wrap all of this into one, but I don't know if it will be possible. I have two power monitoring plugs that determine the "Dreamstation Status" and "Wheelchair Charger Status". The wheelchair charger plug is turned on when the Dreamstation status goes to "Running". If the wheelchair doesn't go to status "Charging" within 5 minutes I want a push notification and a Alexa Announcement to inform me of this. I think I have that part working, but not certain yet because I don't know if both triggers using the same Dreamstation Status of Running can function how I have it configured with mode: single at the same time.

The even more difficult part for me thus far has been the Actionable push notifications. I have a separate automation that has tested sending them and getting the event responses, but I don't know how to accomplish what I want in here. I want the Wheelchair Status Check piece to repeat sending the alert via push and Alexa announcement every 5 minutes until either the "Wheelchair ChargerStatus" changes to "Charging" or the push notification response Disables the repeat or Snoozes it for 15 minutes. I was able to do something similar in NodeRed but I want to try and do it in the HA Automations.

Any help is greatly appreciated. This is a pretty in depth one so just dumping the whole YAML code thus far.

#

Hurm, not letting me post code, file, or pastebin link...

#

There we go had to restart discord

#
alias: "Multi:  Dreamstation and Wheelchair Charger Automation and Notifications"
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.dreamstation_status
    to: Running
    id: Dreamstation Started Running
  - platform: state
    entity_id:
      - sensor.dreamstation_status
    to: Running
    for:
      hours: 0
      minutes: 5
      seconds: 0
    id: Charging Status Check
  - platform: state
    entity_id:
      - sensor.wheelchair_charger_status
    to: Charging
    id: Charging Started
condition: []
#
action:
  - choose:
      - conditions:
          - condition: trigger
            id: Dreamstation Started Running
          - condition: device
            type: is_off
            device_id: 23e74c2ea7647ce54cd72b883f9673a9
            entity_id: switch.wheelchair_charger_plug_relay
            domain: switch
        sequence:
          - type: turn_on
            device_id: 23e74c2ea7647ce54cd72b883f9673a9
            entity_id: switch.wheelchair_charger_plug_relay
            domain: switch
          - delay:
              hours: 0
              minutes: 0
              seconds: 5
              milliseconds: 0
          - choose:
              - conditions:
                  - condition: state
                    entity_id: switch.wheelchair_charger_plug_relay
                    state: "on"
                sequence:
                  - service: notify.mobile_app_iphone_6s
                    data:
                      title: Wheelchair Charger
                      message: Powered and waiting...
                    alias: "Notify via iPhone:  Powered up and Waiting"
                  - service: notify.alexa_media_bed
                    data:
                      data:
                        type: announce
                      message: The wheelchair charger is powered up and waiting.
                    alias: "Announce via Bed Echo:  Powered up and Waiting"
#
            default:
              - service: notify.mobile_app_iphone_6s
                data:
                  message: NO POWER AT THE PLUG
                title: Wheelchair Charger
                alias: "Notify via iPhone:  NO POWER AT PLUG!"
              - service: notify.alexa_media_bed
                data:
                  data:
                    type: announce
                  message: >-
                    ATTENTION!  There is a problem with the wheelchair charger. 
                    No power is detected.  Again, no power is detected.
                alias: "Announce via Bed Echo:  NO POWER AT THE PLUG!"
            alias: Check if the Wheelchair Charger Plug relay is ON
      - conditions:
          - condition: trigger
            id: Charging Status Check
          - condition: not
            conditions:
              - condition: state
                entity_id: sensor.wheelchair_charger_status
                state: Charging
            alias: Check if Wheelchair Charger is NOT Charging
        sequence:
          - service: notify.mobile_app_iphone_6s
            data:
              title: Wheelchair Charger
              message: NOT Charging!  Check connections.
              actions:
                - action: TEST_SNOOZE
                  title: Snooze 15 Min
                  icon: sfsymbols:hourglass.badge.plus
                - action: TEST_SILENCE
                  title: Disable Alert
                  destructive: true
                  icon: sfsymbols:bell.slash
            alias: "Notify via iPhone:  NOT CHARGING"
          - service: notify.alexa_media_bed
            data:
              data:
                type: announce
              message: >-
                The wheelchair is not yet charging.  Make sure the charger is
                properly connected and fully seated.  Again, the wheelchair is
                not charging!
            alias: "Announce via Bed Echo:  NOT CHARGING"
#
      - conditions:
          - condition: trigger
            id: Charging Started
        sequence:
          - service: notify.alexa_media_bed
            data:
              message: >-
                I'm confirming the wheelchair has begun charging! Again, the
                wheelchair has begun charging.
              data:
                type: announce
            alias: "Announce via Bed Echo:  Charging Started"
          - service: notify.mobile_app_iphone_6s
            data:
              title: Wheelchair Charger
              message: Charging has started!
            alias: "Notify via iPhone:  Charging Started"
mode: single