iOS notifications help

Hi,

when i go to services and i chose notify ios_nastja, put the message below - > iPhone receives message… but under configuration, I have set that it automaticly sends a message to the iPhone, if someone enters with wrong password, but i dont get the message? What am i doing wrong?

code:

  • platform: command_line
    name: badlogin
    command: grep -c “Login attempt” /home/homeassistant/.homeassistant/home-assistant.log

automation:

  • alias: Login Failure
    trigger:
    platform: numeric_state
    entity_id: sensor.badlogin
    above: 0
    action:
    service: notify.ios_nastja
    data:
    message: “Login Failure Detected”

notify:

  • name: iOSApp
    platform: ios

Hey,
first of all, please use the code block syntax the next time.

And now to your config … you don’t need the “badlogin” sensor. Furthermore you setup the iOS Component in your configuration.yaml:

# load ios components
ios:

And this automation will send the notification:

automation:
  - alias: login_failure
    hide_entity: true
    trigger:
      platform: state
      entity_id: persistent_notification.httplogin
    condition:
      condition: template
      value_template: '{{ trigger.to_state.state != off }}'
    action:
      - service: notify.ios_nastja
        data_template:
          title: 'Login Failure Detected!'
          message: '{{ trigger.to_state.state }}'

Please leave feedback if this works out for you. :slight_smile:

Thank you very much for your help! it works like acharm! :slight_smile:

where can i check which other persistent notificaions may i use? :slight_smile:

Actually I don’t know…just found that one :thinking:

1 Like