Midnight Wolf
Hello! Some info about me is up on my website: https://wreckedcarzz.com/
- 0 posts
- 9 comments
This is likely way overkill for your needs, but I have Home Assistant control my phone’s alarms, based on my various calendars that I sync using CalDav through DAVx5. HA will adjust the wake-up buffer based on what calendar the event is - so if yesterday I had an in-person appointment at 10am, and the buffer was 2.5h, but tomorrow’s event is remote, I don’t need to wake up as early, and so it adjusts the buffer because of it. This is set in the automation.
Main automation
alias: wreckedcarzz - Auto-Set Phone Alarm from CalDAV description: '' triggers: - trigger: calendar event: start offset: '-8:0:0' entity_id: calendar.appointments id: in_person - trigger: calendar event: start offset: '-8:0:0' entity_id: calendar.appointments_remote id: remote - trigger: calendar event: start offset: '-8:0:0' entity_id: calendar.trips_and_vacations id: trips enabled: false - trigger: calendar event: start offset: '-8:0:0' entity_id: calendar.work_schedule id: work conditions: - condition: template value_template: '{{ trigger.calendar_event.all_day == false }}' alias: Make sure the event is not for the whole day - alias: Last triggered at least 12 hours ago condition: template value_template: >- {{ this.attributes.last_triggered == None or (now() - this.attributes.last_triggered) > timedelta(hours=12) }} actions: - variables: new_buffer: >- {% set current = states('input_number.alarm_wake_up_time_buffer') | float(0) %} {% if trigger.id == 'in_person' %} {{ current if 2.5 <= current <= 3.5 else 3 }} {% elif trigger.id == 'remote' %} {{ current if 0.5 <= current <= 2.0 else 1 }} {% elif trigger.id == 'work' %} {{ current if 1.5 <= current <= 2.5 else 2 }} {% elif trigger.id == 'trips' %} {{ current if 1.0 <= current <= 2.0 else 1.5 }} {% else %} {{ current if 1.5 <= current <= 3.5 else 2.5 }} {% endif %} alarm_hour: >- {{ ((as_datetime(trigger.calendar_event.start) | as_local) - timedelta(hours=new_buffer | float)).hour }} alarm_min: >- {{ ((as_datetime(trigger.calendar_event.start) | as_local) - timedelta(hours=new_buffer | float)).minute }} event_title: >- {{ trigger.calendar_event.summary | replace(',', '') | replace(':', '') }} - alias: Update the dashboard slider action: input_number.set_value target: entity_id: input_number.alarm_wake_up_time_buffer data: value: '{{ new_buffer | float }}' - alias: Send the alarm command action: notify.mobile_app_wreckedcarzz_phone data: message: command_activity data: ttl: 0 priority: high intent_action: android.intent.action.SET_ALARM intent_extras: >- android.intent.extra.alarm.HOUR:{{ alarm_hour }},android.intent.extra.alarm.MINUTES:{{ alarm_min }},android.intent.extra.alarm.MESSAGE:{{ event_title }},android.intent.extra.alarm.SKIP_UI:trueThen I created the necessary helper (input_number.alarm_wake_up_time_buffer) for how early to set the alarm at runtime. Integrate CalDav of course, syncing your calendars to HA, and adjust the automation script as needed. Make sure HA can run in the background/is not limited by battery optimization. And this all requires the HA companion app, obviously.
Boom, with all that in-place, I just set my events into my calendar, they sync, HA triggers a couple hours before I need to wake up, it sets the alarm, and I get woken up at the planned time.
I use the Google clock, so no promises for any other system, but I’ve been using this for 6+ months and it’s been great. It does add a point of failure (server/HA freezes; internet outage when the automation triggers) but it hasn’t happened yet, just hypotheticals.
Selfhosted@lemmy.world•Is Authelia enough without fail2ban or crowdsec?byMidnight Wolf@lemmy.worldEnglish
6 daysDo make sure that you can eventually get back in after testing, though. Sure, it’s safer when even you can’t access it, but… :p
- 7 days
Ah, you got the buggy firmware
Ask Lemmy@lemmy.world•What is the punchline to the worst joke you know?byMidnight Wolf@lemmy.worldEnglish
8 dayspunches you in the face
…you asked for a punchline, don’t be mad at me
- 9 days
I don’t know what ‘headline’ or ‘Coachella’ means so that’s a yes. Unless headline as in newspaper and Coachella as in a line of sex toys… which wouldn’t change the answer to the question.
Selfhosted@lemmy.world•Portainer 3.0 is coming, and here's what it means for you — PortainerbyMidnight Wolf@lemmy.worldEnglish
10 daysI went from Dockge to Dockhand, though both are good. Dockge was my UI of choice for the last couple of years, so slim and simple. I tried Dockhand on a whim and the extra features won me over, without having a bazillion buttons and confusing UI.
Games@lemmy.world•Ubisoft begin removing Ubisoft Connect from Steam with the new Ubisoft Connect ServicesbyMidnight Wolf@lemmy.worldEnglish
11 daysI come from the time where you just run the game and it, you know, ran. While I think even Steam itself is stupid as hell, at least someone is stopping the idiocy a little bit. Though ubisoft is dead to me, so it’s a participation award, not a real ‘woo, go awful company’ cheer.






I have a server that I wanted to do this with, and cpu-only interference was several minutes for pretty simple tasks (all text, couple of sentences). I shelled out the cash for a 5060 Ti 16GB earlier this summer, and even with a pcie 3 x16 slot running at x4, I’m down to 5-30 second responses and rapid output speeds, even with large conversations. But the initial prompt/loading is still a couple of minutes by itself, so I leave the model in vram always.