I am trying to start and stop Focus Mode using intent on my phone.
I found a reddit reporting there are intents available in Digital Wellbeing, which is the application Focus Mode is part of.
I tried with this action in a script:
This should open the settings for Focus Mode, but it doesn’t work.
I followed the instructions to receive intents in Companion App and created the automation reported in the first post to show the intent received, but I receive no notification when I run the action.
Hi @dshokouhi, your solution did the trick for the sample action I posted, but my intention were to start Focus Mode depending on time, date and events.
The actions in the reddit seem to do the trick, but how should I configure my script?
So I’m trying to get Home Assistant to automatically trigger something whenever I loose Bluetooth connection to my car. I’m not able to Trigger on connected_paired_devices and From: since it returns a list. I don’t want it to trigger every time my BT status change on my phone only when I loose connection to my car.
So I thought I’d send an Intent with Tasker? But I have no Idea on where to start and how I get Home Assistant-app to register the Intent and send it to my server.
I’m able to open a specific list/note in Google Keep, using Tasker:
Send Intent
Action: "android.intent.action.VIEW"
Data: "https://keep.google.com/u/0/#LIST/LISTID" #found by accessing Google keep, with a browser, and taking note of the url of a specific list
Package: "com.google.android.keep"
Target: Activity
What would be the best way to apply this with notify?
Unfortunately its not practical to auto-open the shopping list in Google Keep, as the update location - even when using the zone with the park lot added - simply takes to long to change.
I would already be returning to the car when the location changed.
this is not a good idea it will kill the sensor worker and you wont see periodic updates.
looks like the app needs to support intent categories which it currently does not. So you can in the meantime send the intent for the app for tasker to pick up and perform the desired steps. Feel free to submit a feature request to add support for intent categories to do this directly
Hi,
I no longer get value data in android intents. I used to read the value of battery from my mi band using Notify for mi band app Tasker integration. I believe it started to occur after updating HA Companion App, which is reading android intents from Notify for mi band. Any hints how to solve the problem?
There is no android intents about battery or heartrate in the logs… How can I find out what the issue is?
Edit: Checked again with refreshed logs and there are android intents about mi band battery, but again with no value…
trigger:
- platform: template
value_template: "{{ 'xx:xx:xx:3C:BB:AC (Seat BT )' not in state_attr('sensor.YOURPHONE_bluetooth_connection', 'connected_paired_devices') }}"
You have to look how your device is named in the attributes, for me it is the mac adress and the name of my car.
Everytime it connects the bt the template will render to false and when disconnects it will fire and do your action.
I don’t have time to file a proper issue just now, but I do think this broke recently. I’m seeing a lot of errors in the companion app log like “Key max_charging_voltage expected String but value was a java.lang.Integer”, and all of the values for intents are empty by the time they reach HA (presumably because of the type error).
I’m looking into making an automation for Android Auto when it’s connected it should start the navigation to a specific location based on the time. In the Android Auto HA app there is a way to start navigation to saved locations, but how to automate it?
I was looking into the Android Intent documentation and I think it should be possible but unfortunately no success.