Python API for sending notifications to Android/Fire TVs
Project description
Android TV / Fire TV Notifications
Python package that interfaces with Notifications for Android TV and Notifications for Fire TV to send notifications to your TV.
Usage
- Install the application on your TV
- Get the IP of the TV unit
from notifications_android_tv import Notifications
notify = Notifications("192.168.1.10")
# validate connection
try:
await notify.async_connect()
expect ConnectError:
return False
await notify.async_send(
"message text",
title="Title text",
)
Optional parameters
title
: Notification titleduration
: Display the notification for the specified period. Default is 5 secondsfontsize
: Text font size. UseFontSizes
class to set the fontsize. Default isFontSizes.MEDIUM
position
: Notification position. UsePositions
class to set position. Default isPositions.BOTTOM_RIGHT
.bkgcolor
: Notification background color. UseBkgColors
class to set color. Default isBkgColors.GREY
.transparency
: Background transparency of the notification. UseTransparencies
class. Default isTransparencies._0_PERCENT
.interrupt
: Setting it toTrue
makes the notification interactive and can be dismissed or selected to display more details. Default isFalse
icon
: Can bestr
represnting the file path or anImageUrlSource
that includes the url and authentication params to fetch the image from a url.image_file
: Can bestr
represnting the file path or anImageUrlSource
that includes the url and authentication params to fetch the image from a url.
Refer to the example file for setting these parameters directly or from a data dictionary (as documented in https://www.home-assistant.io/integrations/nfandroidtv)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for notifications-android-tv-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f6b4faaeb4df2c6f5d48ce24954c2ef4ff8a47f5548222ba334e022b0b3bbd1 |
|
MD5 | d660fbae1095d8df820fa837ca4281dc |
|
BLAKE2b-256 | 00e823c07a7c02dc4655f2bb45c617fa97b86964d1c2c6da51417d8dd526f176 |
Close
Hashes for notifications_android_tv-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c0cc59a1d64ff3c804498af4038629ddca3ecb59b457e70cc863ab408ddb161 |
|
MD5 | b5b5302c50b0fa572af29fc8776413a6 |
|
BLAKE2b-256 | ff5009f44b3c094e233bcbab59bbafc4722e2e7cdf0af5931adbfc0211cf2b6d |