# Creating readable push notifications

**URL:** <https://community.homey.app/t/creating-readable-push-notifications/56175>\
**Category:** Flows\
**Tags:** flow\
**Created:** [December 7, 2021, 9:30pm UTC](https://community.homey.app/t/creating-readable-push-notifications/56175 "2021-12-07T21:30:51Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![PV2134](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pv2134/32/16433_2.png) [@PV2134](https://community.homey.app/u/PV2134)\
**Post date:** [December 7, 2021, 9:30pm UTC](https://community.homey.app/t/creating-readable-push-notifications/56175/1 "2021-12-07T21:30:51Z")

</div>

I’m working on a “bedtime” flow that locks the entire house and verifies if all contact sensors do not have an alarm status. But I need to construct a readable (Dutch) message, for example  
Achterdeur: gesloten  
Voordeur: gesloten  
Garagedeur: open  
Tuindeur: gesloten

“closed” or “open” is depending on the contact alarm status true or false. There are 2 issues here, one is which code to use to insert a carriage return into the text message and another, how to set the text variable based on a boolean variable. I know the math capabilities, but could not find anything related to constructing text variables. My impression is that sorting out these options in existing apps (More logic or similar) is too much programming just to set something simple as this. Or am I wrong here?

Peter

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [December 7, 2021, 9:50pm UTC](https://community.homey.app/t/creating-readable-push-notifications/56175/2 "2021-12-07T21:50:41Z")

</div>

Peter,  
I think this gets you started:  
(It notifies only about open doors or windows, but that could be changed)

> [@Array of door sensors -\> filter -\> notif i any open by name](https://community.homey.app/t/array-of-door-sensors-filter-notif-i-any-open-by-name/53754/11):
>
> I think this can be of use (in Dutch though): Flow: Action card with HomeyScript tag: Result: Script:

---

<div class="post-metadata">

**Author:** ![PV2134](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pv2134/32/16433_2.png) [@PV2134](https://community.homey.app/u/PV2134)\
**Post date:** [December 7, 2021, 10:00pm UTC](https://community.homey.app/t/creating-readable-push-notifications/56175/3 "2021-12-07T22:00:03Z")

</div>

Excellent! I was afraid that I needed to create a custom script, but looking at the posted thread it seems pretty straightforward. Thanks for yr quick reply!

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [December 8, 2021, 6:07am UTC](https://community.homey.app/t/creating-readable-push-notifications/56175/4 "2021-12-08T06:07:31Z")

</div>

You don’t need scripts:

- to add newlines, you probably have to use the [web app](https://my.homey.app); there, you can insert newlines using Shift-Enter
- to show “open/gesloten” based on a tag, you can use some math(-ish) expressions

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/c/ec9de0f5aa7bb5efa72be2c6d4ffb92d50910a84.jpeg)

For reference, this is what the text part of that card looks like while editing:

```auto
Deur 1: {{ [Gedetecteerd] ? "open" : "gesloten" }}
Deur 2: {{ [Gedetecteerd] ? "open" : "gesloten" }}

```

(I’m using two distinct [Gedetecteerd] tags, one set to “Ja”, the other to “Nee”)

On my phone, it looks like this:

 ![IMG_7944](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/5/f53fdb78a9f2e2c7c420d353aee69507fa2311af.jpeg)

The only annoyance is that quotes are being shown. I haven’t found a way to remove them (but didn’t look very closely).

---

<div class="post-metadata">

**Author:** ![Edwin\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/edwin_d/32/136417_2.png) [@Edwin\_D](https://community.homey.app/u/Edwin_D)\
**Post date:** [December 8, 2021, 7:46am UTC](https://community.homey.app/t/creating-readable-push-notifications/56175/5 "2021-12-08T07:46:04Z")

</div>

I’ve tried this, with and without spaces in the formula, both in push notifications and timeline, but always get it literally:  
{{false?”open”:”closed”}}

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [December 8, 2021, 7:58am UTC](https://community.homey.app/t/creating-readable-push-notifications/56175/6 "2021-12-08T07:58:48Z")

</div>

What does the flow card look like (screenshot)?

---

<div class="post-metadata">

**Author:** ![Edwin\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/edwin_d/32/136417_2.png) [@Edwin\_D](https://community.homey.app/u/Edwin_D)\
**Post date:** [December 8, 2021, 8:00am UTC](https://community.homey.app/t/creating-readable-push-notifications/56175/7 "2021-12-08T08:00:44Z")

</div>

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/3/d31784b66c32aead1659bd0d925f8f0072398108.jpeg)

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [December 8, 2021, 8:01am UTC](https://community.homey.app/t/creating-readable-push-notifications/56175/8 "2021-12-08T08:01:35Z")

</div>

Use normal quotes, not “smart” quotes.

---

<div class="post-metadata">

**Author:** ![Edwin\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/edwin_d/32/136417_2.png) [@Edwin\_D](https://community.homey.app/u/Edwin_D)\
**Post date:** [December 8, 2021, 8:02am UTC](https://community.homey.app/t/creating-readable-push-notifications/56175/9 "2021-12-08T08:02:46Z")

</div>

These come straight from the keyboard, don’t know how else to enter them.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [December 8, 2021, 8:04am UTC](https://community.homey.app/t/creating-readable-push-notifications/56175/10 "2021-12-08T08:04:13Z")

</div>

Perhaps it’s the rendering that makes them look like smart quotes, but they look suspicious. Try pasting this after the tag:

```auto
? "open" : "dicht"

```

---

<div class="post-metadata">

**Author:** ![Edwin\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/edwin_d/32/136417_2.png) [@Edwin\_D](https://community.homey.app/u/Edwin_D)\
**Post date:** [December 8, 2021, 8:08am UTC](https://community.homey.app/t/creating-readable-push-notifications/56175/11 "2021-12-08T08:08:40Z")

</div>

You’re right, somehow on IOS/iPad both the on screen keyboard and the typecover are being smart-asses, both in the app and safari/web app. With plain quotes it works.

---

<div class="post-metadata">

**Author:** ![Edwin\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/edwin_d/32/136417_2.png) [@Edwin\_D](https://community.homey.app/u/Edwin_D)\
**Post date:** [December 8, 2021, 8:27am UTC](https://community.homey.app/t/creating-readable-push-notifications/56175/12 "2021-12-08T08:27:12Z")

</div>

Ah, found it. There’s an option to get stupid quotes. You can decide which option you think is the stupid one 😜

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/1/91dce9ff10470c902172ceb12e007d6f73eadb46.jpeg)
