Automation to send intent to a specific app

Hello dear Community,

Time for me to post a new question :sweat_smile: since I am definitely not an expert and it’s very hard for me to find a solution without the help of smart people.

So, today’s problem is the following:
I am in possession of one of those nasty Samsung S phones with OLED display problems. Auto Brightness can not function descently, since for some range of ambient light the display goes totally black (let’s say between 500 and 100lx) and partially black with green lines (between 1000 and 500lx).
Over 1000lx is ok and under 100lx is also ok.

The solution I found is to deactivate auto brightness, set it to maximum and to use a third party application called Screen & Notifications Dimmer, which can apply a filter to the hole display and darken it.

The remaining problem is that I have to change it many times over the day, which affect considerably the user experience on this Samsung phone.

Thus, I was wondering if it would be possible to automate the hole thing with home assistant.

A light sensor is actually working and I can follow it within HA as shown in the following picture

What I want to do in HA:

  • get the lux value and decide by the means of an automation which opacity level will be configured in the application Screen & Notifications Dimmer
  • send this value (intent broadcast) to the screen dimmer app to set the opacity of the applied filter according to the scenario.

i.e. 0≤ ambient light level < 100lux → set opacity to 90%

Is this even possible ?

Any help will be much appreciated. Thank you!

P.S. this is for experimental purposes, this phone is not one of my main phones, just laying there at home principally as a gadget to check and control stuff, HA among other things. But, this brightness issue is so annoying, I admit.

Why do you need a third party app for that?

Notification Commands | Home Assistant Companion Docs

Thank you @Hellis81 for your suggestion.

As mentioned above, the “normal” brightness functionality of the phone is broken, probably due to a hardware failure of the OLED.
It gives in most cases, either a green screen with strange lines or a black screen (of death).

8328

This app is the only one working as it applies a filter and is not setting a brightness value to the display.

8322

Maybe apps like tasker are a better fit because they live solely on the phone and do not rely on a remote server like HA?

Thank you @Edwin_D, yes probably tasker automate or macrodroid could be a better shot. They are also paid apps I think.
But, personally, I prefer HA and a yaml code if there is the possibility to do so.

yes you can broadcast an intent from the android app to another app, it will require trial and error on your part as its not cut and dry

Thanks @dshokouhi, I guess this is too harsh for the beginner I am. I think I will skip on this :sweat_smile:

its not terrible to translate if the app you want to control has the intents documented somewhere

This is the point, there is not enough documentation of this app and on how it’s works with tasker and similar apps.