LaMetric TIME Transport Adaptor¶
| Transport ID | Source | Requirements | Optional |
|---|---|---|---|
lametric | lametric.py | LaMetric Integration | - |
Motivation¶
LaMetric TIME is a smart display with a Home Assistant integration, discovered automatically on the network, which provides lametric.message for text and lametric.chart for bar charts.
The LaMetric transport adds:
- SuperNotify's priority mapped to LaMetric's display settings - cycles, sound, icon and icon type
- Bar charts from
lametric_chart_data, for example the last few sensor readings - Optionally, message text shortened for the small display, with URLs removed
The display has no room for a title, so only the message is shown.
Targets¶
Target the notify entity the LaMetric integration creates for each display, for example notify.lametric_kitchen, directly or through a recipient. The lametric delivery is selected for these entities ahead of the generic Notify Entity one, without needing to be named, and each display targeted is sent the notification.
Alternatively, fix the display on a delivery with device_id in its data, used when no LaMetric entity is targeted. Find it in Settings → Devices & services → LaMetric, or with the template {{ device_id('notify.lametric_kitchen') }}.
A delivery with neither is skipped.
Priority Mapping¶
Each of these can be overridden with the data keys below.
| SuperNotify | LaMetric priority | cycles | icon_type | sound | icon |
|---|---|---|---|---|---|
| critical | critical | 0 (until dismissed) | alert | alarm1 | a1784 |
| high | warning | 2 | alert | knock-knock | i140 |
| medium | info | 1 | info | notification | i2867 |
| low | info | 1 | none | (silent) | i2867 |
| minimum | info | 1 | none | (silent) | (none) |
Data Keys¶
device_id— the LaMetric device id, used when no LaMetricnotifyentity is targetedlametric_sound— a built-in sound, such asalarm1…alarm13,bicycle,cash,dog,knock-knock,letter_email,notification,positive1,win,windlametric_icon— an icon id from the LaMetric icon gallery, such asi2867lametric_cycles— times the notification is shown,0to stay until dismissedlametric_icon_type—none,infooralertlametric_chart_data— a list of numbers, sent as a bar chart withlametric.chartinstead of the messagelametric_simplify— shorten the message and remove URLs (defaultfalse)
Other data isn't passed on, since the LaMetric actions reject what they don't know.
Example Configuration¶
delivery:
lametric:
transport: lametric
data:
device_id: "49b6e2186ef37e164818aacb9cea1f53"
lametric_doorbell:
transport: lametric
data:
device_id: "49b6e2186ef37e164818aacb9cea1f53"
lametric_sound: "knock-knock"
lametric_icon: "i140"
lametric_icon_type: "alert"
lametric_cycles: 2
Example Call¶
action: supernotify.notify
data:
message: "Temperature trend"
delivery:
lametric:
data:
lametric_chart_data: [18, 20, 22, 21, 23, 24]
lametric_cycles: 3
And a message to a display's entity, with no delivery configured:
Or to the configured delivery, with the archived result:
action: supernotify.notify
data:
message: "LaMetric smoke test - if you see this on the display, it works!"
delivery: lametric
{
"deliveries": {
"lametric": {
"delivered": [{
"calls": [{
"domain": "lametric", "action": "message",
"action_data": {
"device_id": "49b6e2186ef37e164818aacb9cea1f53",
"message": "LaMetric smoke test - if you see this on the display, it works!",
"cycles": 1,
"priority": "info",
"icon_type": "info",
"icon": "i2867",
"sound": "notification"
}
}]
}]
}
}
}
Discovery¶
Delivery (default selection). If the lametric integration is configured and no lametric delivery is defined, a lametric delivery is generated automatically. It's used when a target is one of the integration's notify entities, and otherwise not, since it has no display to send to.