I’m using an automation connected to a service that I created with pyscript
to show a text containing a weather forecast as notification on mobile.
action:
- service: pyscript.get_weather_report
data:
location: ...
response_variable: response
- service: notify.mobile_app_pixel_8
data:
title: Weather forecast
message: <p> {{ response['report'] }} </p>
data:
url: entityId:pyscript.weather_report
clickAction: entityId:pyscript.weather_report
The get_weather_report
function both writes the text into the entity attribute pyscript.weather_report.text
and returns it into response['report']
. This way I can show it into the notification message and persist it as entity. Note that I had to use the entity attribute because text entities have a maximum length of 255 characters.
Now the problem is that this text is quite long so that it doesn’t properly fit in a mobile notification. That’s why I thought of using the click action to bring the user to the entity containing the weather repot. However, this brings up the info panel of the entity, so that I have to go into the attributes tab and open the collapse menu, which is not really ideal.
Is there a way to just show the entire text as a simple textbox (I don’t need at all the entity info tab) when clicking on the notification?