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.2.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d643ddefebfd6f3fb6b833b1994a82cc7b159232ede08bf9571ba6aa1a3bd1c |
|
MD5 | b26e5358bc447b24e5cbc5d5ee7c885f |
|
BLAKE2b-256 | c4e07609d9b0f1898104c33edabadd3387eb964f39791e2febd3d3581a1c944e |
Close
Hashes for notifications_android_tv-1.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7da7c5ae9433bf649330f63a4cbbfae8ff722a43171fbfdd2ad36899da9d087e |
|
MD5 | 29565bd23d3bae0752f9dbc1f76235b3 |
|
BLAKE2b-256 | abc636597c16fd057ed381458fb99c934613726f6f948a570f14234cd09a0c26 |