Skip to content

Instantly share code, notes, and snippets.

@MarkWattTech
Created April 20, 2021 22:55
Show Gist options
  • Save MarkWattTech/8633d85d46868e43776a6219acb4585b to your computer and use it in GitHub Desktop.
Save MarkWattTech/8633d85d46868e43776a6219acb4585b to your computer and use it in GitHub Desktop.
Code from TV Notifications Video
# Dont forget to Subscribe to Mark Watt Tech!
# Example configuration.yaml entry
notify:
- platform: nfandroidtv
name: yourDeviceName
host: 192.168.1.12
# Simple notification
duration: 10
fontsize: small
position: center
# Image notification
duration: 10
fontsize: small
position: center
color: red
file:
path: /config/www/images/yourimage
# BONUS! - Get camera image to display in notification
# There are a few ways of doing this. The method I am going ot use is the camera.snapshot service.
# When called this will take a snapshot from your camera at that time and store it in a file.
#
# This would look something like :
service: camera.snapshot
data:
entity_id: camera.yourCamera
filename: "/config/www/cam_captures/yourCamera{{ now ().year }}_{{ now ().month }}_{{ now ().day }}_{{ now ().hour }}_{{ now ().minute }}.jpg"
# The above filename adds the timestamp to the image. You can use any name you want though
# Then simply call that image in your notification like so :
duration: 10
file:
path: /config/www/cam_captures/kitchen_2021_4_20_20_54.jpg
# Another option would be o pull the image directly from your camera still image (if your camera supports the still image stream
# So to recap, grab a snapshot, store it, display it. Cheers
@Fran6u
Copy link

Fran6u commented Jan 24, 2022

Will this work with a video stream instead of still images?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment