Automations based on next scheduled alarm (on Android device)

Hey!
Install the app in your daughters phone, then use a different name for the sensor. E.g. input_datetime.next_alarm_daughter. You will find it under connection settings.

1 Like

Sorry but need to ask


I have a sensor at sensors.yaml:

  • platform: time_date
    display_options:
    • ‘date_time’

Then I have at configuration.yaml:

input_datetime:
next_alarm:
name: Next scheduled alarm
has_date: true
has_time: true

I installed Hassalarm to my daughter phone with entity_ID: input_datetime.next_alarm_daughter but cannot find that entity anywhere
 Do I have to add something somewhere else?

Hey!
Yes, you need to add input_datetime.next_alarm_daughter as well in your configuration.yaml:

input_datetime:
  next_alarm:
    name: Next scheduled alarm
    has_date: true
    has_time: true
  next_alarm_daughter:
    name: Next scheduled alarm for daughter
    has_date: true
    has_time: true

Hi!

Sorry my stupid question
 Thx 4 your answer
!!

Hi!

Got it working but there is one thing i don’t understand.

From my phone hassalarm creates entity next alarm time correctly but from my daughter phone there is -5 min difference. So if alarm time is 14.00 -> entity time is 13.55 and so on


Do you have any idea why like this? (I can live with that but I’m just a curious and also if there is a bug
)

Hey!
Yes, this is a bug with the Samsung alarm app: https://github.com/Johboh/hassalarm/issues/11
Solution is to use Google alarm clock app instead.

Thx for the information! Any case when you’re not so sure
 You’re doubting yourself and own faults :wink:

And
 Anybody got an idea how to add entity next alarm time minus 5 minutes to the node red? I have otherwise working wakeup light but don’t know how to do this


Fantastic work! Works like a charm and spared me a ton of work. Thanks a lot!

This functionality is in the home assistant app also.
No need for an extra app anymore.
But if you don’t want the companion app due to privacy then this is a good alternative

nice one bro

there more than one skin a cat
I did it
by creating a new sensor

    minutes_next_alarm_stephan:
      friendly_name: "Minutes until Next Alarm Stephan"
      unit_of_measurement: "m"
      value_template: >-
        {% set dummy = states("sensor.time") %}
        {{((states('sensor.sm_g986b_next_alarm')|as_timestamp|int - now()|as_timestamp|int)/60)|int}}
      availability_template: "{{ not is_state('sensor.sm_g986b_next_alarm','unavailable') }}"
      attribute_templates:
        time: "{{ state_attr('sensor.sm_g986b_next_alarm','Local Time') }}"

now I can just use that in a trigger.

  trigger:
    - platform: numeric_state
      entity_id: sensor.minutes_next_alarm_stephan
      below: "2"

Oh, did not know that. How do I see that?

Install the home assistant app, click on app configuration and then manage sensors → next alarm (or something like it).