Anashost / MY-HA-DASH

81 stars 8 forks source link

Person card - 2 questions #5

Closed michal-krawczyk closed 8 months ago

michal-krawczyk commented 8 months ago

Hi

On person card in the second view:

  1. There is second chip in second row which refers to entity: automation.a_on_state. Where could I find that automation? After tapping it calls for script to find a phone.
  2. In the third row (sensor.user_geo_1) it should be showing mdi:abacus but it doesn't. See my screenshot...

Thanks

Zrzut ekranu 2023-10-17 185841

Anashost commented 8 months ago
michal-krawczyk commented 8 months ago
Anashost commented 8 months ago
alias: 3- user find phone
sequence:
  - service: notify.mobile_app_user
    data:
      message: command_ringer_mode
      data:
        command: normal
  - service: notify.mobile_app_user
    data:
      message: command_volume_level
      data:
        media_stream: notification_stream
        command: 10
  - service: notify.mobile_app_user
    data:
      message: Finding phone
      title: Home assistant
      data:
        ttl: 0
        priority: high
        channel: notification_stream
mode: single
Anashost commented 8 months ago

I see, In my persons card im not using an icons for geo location to keep the same size for the card when swipng. but if you would like to use it (i would not LoL) here is the card updated:

      - type: custom:mushroom-entity-card
        card_mod:
          style: |
            ha-card {
              --font-size: 0.2em;
              --icon-size: 1.5em;
              --border-width: 0;
              --box-shadow: none;
              --background: none;
              --border: none;
              --spacing: none;
              --font-weight: normal;
            }
        entity: sensor.user_geo_1
        icon_type: icon
        icon: mdi:abacus
        primary_info: ''
        name: 'Possible Location:'
        layout: vertical
        fill_container: true
        double_tap_action:
          action: none
        hold_action:
          action: none
        tap_action:
          action: more-info
michal-krawczyk commented 8 months ago

Thanks for this. I'm testing the script and something is not working. Alias seems not to be working...

alias: 3- user find phone

Anashost commented 8 months ago

Where are you adding the script? You should do that from the UI, so create a new script and then in top right choose edit in yaml and replace everything with the code i provided (also replace user with your own user name)

michal-krawczyk commented 8 months ago

I did that and it's still not working. Claiming that it's unable to call service/script_name (service not found)

Anashost commented 8 months ago

Just to confirm you added the script and saved it successfully. then when you run it, it gives this error?

Do have an iPhone? Because i don't think this script will work for iPhones as it needs different configurations.

michal-krawczyk commented 8 months ago

It's an Android phone. I managed to figure out what was wrong with calling script. In person card it should refer to script ID service: script.1697660452393 like so.

The only thing that's not working is when I test the script manually command_ringer_mode isn't working (although it says it was successful). Code below.

  - service: notify.mobile_app_mike_s_s23u
    data:
      message: command_ringer_mode
      data:
        command: normal
michal-krawczyk commented 8 months ago

Sorry, my bad, it does work. I thought it should like play some signal... Thanks for your assistance.

Anashost commented 8 months ago

Nice you figured it out,

To set a tune for finding the phone: from HA app go to settings > companion app > Notification channel > add a tune for the Notification_stream