-
Notifications
You must be signed in to change notification settings - Fork 0
Notification 'Omit is undefined...' Warning #3
Description
When using the notification.yaml as a blueprint in Home Assistant, the following warning is generated when various variables are left blank. In my application, the Image URL (image_url) was left blank, but the resulting notification popup on Android TV had an oversized window as if the image should be there. Other variables/functionality seems to be impacted by this issue as well due to shared syntax: image_url, mdi_icon, sound_url, and sound_volume_percent.
I have a verified solution below that corrects the issue in my environment. Thank you so much for your development of this!
Log transcript:
Log details (WARNING)
Logger: homeassistant.helpers.template
Source: helpers/template/init.py:1750
First occurred: 21:30:24 (1 occurrence)
Last logged: 21:30:24
Template variable warning: 'omit' is undefined when rendering '{{ _ev.image_url if _ev.get('image_url') else omit }}'
User-Verified Fix (your mileage may vary):
Change all 8 instances of else omit to else '''' over lines 377 through 398 of notification.yaml. Users who installed this blueprint can find the file at config\blueprints\script\Trooped\notification.yaml.
User Environment Details:
-
Home Assistant:
- Installation method: Home Assistant OS
- Core: 2025.12.5
- Supervisor: 2025.12.3
- Operating: System 16.3
- Frontend: 20251203.3
-
Android TV:
- Device: Google TV Streamer
- System Firmware: UTTK.250729.004
- Cast Firmware: 3.72.446070