Created
April 20, 2021 22:55
-
-
Save MarkWattTech/8633d85d46868e43776a6219acb4585b to your computer and use it in GitHub Desktop.
Code from TV Notifications Video
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
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
thank you for this detailed summary.
though I am facing one issue which is my automation is not triggering when motion is detected.
not even the script if I add one to the camera to store a snapshot in a specific location
on the manual press all looks good, the snapshot is stored and the notification showed on TV
but when I walk in front of the camera, nothing happens