Skip to content
Draft
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions docs/notifications/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,77 @@ automation:
progress_max: 32
```

#### Styling the progress bar <span class='beta'>BETA</span> {#styling-the-progress-bar}

On Android 16.0+, you can customize the progress bar with segments, points, and icons.

:::note
When using any of these options together with a video attachment, the video attachment will not be shown. The `progress_indeterminate` parameter will also be ignored.
Comment thread
inukiwi marked this conversation as resolved.
:::

The following parameters can be mixed and matched together to style the progress bar:

##### Progress segments

- `progress_segments`. A list of segments that make up the progress bar, each with its own length and optional color.
- **Required properties**: `length`. The length/size of the segment, any number larger than 0.
- **Optional properties**: `color`. Hex color code for the segment (for example, `"#ff0000"` or `"#00ff00"`).
Comment thread
inukiwi marked this conversation as resolved.
Outdated
Comment thread
inukiwi marked this conversation as resolved.
Outdated
- **Note**: When using segments, `progress_max` is automatically calculated as the sum of all segment lengths and should not be specified separately.
Comment thread
inukiwi marked this conversation as resolved.
Outdated

##### Progress points

- `progress_points`: Markers displayed as points along the progress bar to highlight specific milestones or thresholds.
- **Required properties**: `position`. The position on the progress bar where the point should appear (must be between 0 and `progress_max`).
- **Optional properties**: `color`. Hex color code for the point (for example, `"#ffde03"`).
Comment thread
inukiwi marked this conversation as resolved.
Outdated

##### Progress icons

- `progress_start_icon`: Icon displayed at the start of the progress bar. For example: `"mdi:battery-10"`.
- **Format**: Material Design Icons only, use format `mdi:icon-name` (for example, `mdi:home` or `mdi:download`).
- `progress_end_icon`: Icon displayed at the end of the progress bar. For example: `"mdi:battery"`
Comment on lines +645 to +647

@bgoncal bgoncal Jun 18, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to define start and end? Can't we make it generic so the user defines a bunch of points and we just render based on that definition?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think of the "Point" as an object containing:

  • Length
  • Icon
  • color
  • maybe more properties..

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have a "accessibility_name" as well for people using voice over

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably make it more generic, but if the goal is to make it easier for the end user I think it would make things more complicated by explaining all the restrictions.

A point can only have a position and color, it will always be rendered as a small dot on the progress bar and can't have any icon. There can be unlimited points on a progress bar.
The icons are placed next to the progress bar and not on it, so they look very different from points.
The exception to that could be the tracker icon, which is placed on the progress bar, but it's still different from a point.

In the image below you can see the difference: the arrow and the car are trackers, the pink square is a point.

image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood, but iOS has more flexibility in this situation (for the first time 🙌🏻), when this gets implemented in iOS we could allow users to customize their points, for example:

In a "waiting for package delivery" scenario:

Point 1:

  • Warehouse icon
  • Color blue
  • length 0 (if I understood correctly this would mean the start)
  • accessibility name: At warehouse

Point 2:

  • Truck icon
  • Color brown
  • Length 10
  • accessibility name: On it's way

Point 3:

  • House icon
  • Color green
  • Length 20
  • accessibility name: Delivered

I think this way we keep it more future proof, what do you think? We can have default values as well so the user does not need to fill everything

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depends how you write it, I'd say we explain in a simple manner + examples + one image pointing to the part of the UI the YAML refers to (have a UI in HA instead of yaml would be lovely but... out of scope).

"To define your notification progress indicators you just need to provide an array of points, look at the example below"

<yaml example>

"The points located at position 0 or at progress_max can define icons to be visible at the beginning and end of the progress bar, the other points do not support icons and will be displayed along the way."
"You can define only 1 point-tracker to indicate the progress"

"Check how it looks like in a package delivery scenario following the image below"

<Mocked notification image with poins overlayed>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My example above has the assumption we add a key "is_tracker" or something like that

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see the two proposal face to face to decide. I agree that point seems more generic but at the same the logic to display before and after the progress bar is not friendly

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps thats where we draw the line and we start differentiating, android specific use cases and iOS specific. If the original proposal is implemented I can make it happen in iOS as well and then for more customization a third type can be introduced just for iOS.
I hope google does not make this more flexible in the future, otherwise the original proposal wont be able to accomodate the changes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created a draft of what the documentation would look like in my opinion if we go for a points-only approach: inukiwi@0f88d27
It doesn't make it too complex in this form, but it doesn't cover details like the tracker point looking different from other points etc.

- **Format**: Material Design Icons only, use format `mdi:icon-name` (for example, `mdi:flag-checkered` or `mdi:check-circle`).
- `progress_tracker_icon`. Icon displayed in a circular badge that tracks the current progress position. For example: `"mdi:lightning-bolt"`.
- **Format**: Material Design Icons only, use format `mdi:icon-name` (for example, `mdi:car` or `mdi:walk`).
- **Note**: The tracker icon has a colored circular background for emphasis.
Comment thread
inukiwi marked this conversation as resolved.
Outdated

**Icon colors**

- `progress_start_color`. Color for the start icon. For example: `"#ff0000"`.
- **Default**: System accent color.
- `progress_end_color`: Color for the end icon. For example: `"#00ff00"`.
- **Default**: System accent color.
- `progress_tracker_color`. Color for the tracker icon. For example: `"#ffde03"`.
- **Default**: System primary color.
- `tracker` will be shown in a circle at the current progress

```yaml
automation:
- alias: Notify of car charging progress
trigger:
...
action:
- action: notify.mobile_app_<your_device_id_here>
data:
title: "Live update"
message: "This will show on the always-on display"
Comment thread
inukiwi marked this conversation as resolved.
Outdated
data:
progress: 50
progress_segments:
- length: 80
- length: 20
color: "#ff0000"
progress_points:
- position: 80
Comment thread
inukiwi marked this conversation as resolved.
progress_start_icon: mdi:battery-10
progress_end_icon: mdi:battery
progress_tracker_icon: mdi:lightning-bolt
progress_tracker_color: "#ffde03"
tag: progress_style_notification
```

This example will create a notification like the one shown here:
![Customized progress bar notification](/assets/android/progress_bar_customized.png)

### Live Updates

On Android 16.0+ you can create "Live updates" notifications. These notifications are pinned to the top of the notification shade and appear on the lockscreen and always-on display. They will also display as a chip in the status bar with an optional short text. This might vary by manufacturer.
Expand Down
Binary file added static/assets/android/progress_bar_customized.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.