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
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.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8eb29ab839200f210938b976e727868090c73a2ac320f360422ff3d3054d443e |
|
MD5 | 098d2d8ccef4cdea3f9699718f9115d1 |
|
BLAKE2b-256 | f46bde1f8e7784959d5232ab19fc39f06685178e4b2879a1cb92577d3c8535d4 |
Close
Hashes for notifications_android_tv-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 945032175c960281a95f61a48e0ffbc842396a09693f2fb4158e8091d0c1a814 |
|
MD5 | 4a26d8bf54b599603f4da8399994096f |
|
BLAKE2b-256 | 0bf23a535d91cd7439a6f7f99c15d276efebe1b7489eca1cec27040b474fe110 |