Skip to main content

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 title
  • duration: Display the notification for the specified period. Default is 5 seconds
  • fontsize: Text font size. Use FontSizes class to set the fontsize. Default is FontSizes.MEDIUM
  • position: Notification position. Use Positions class to set position. Default is Positions.BOTTOM_RIGHT.
  • bkgcolor: Notification background color. Use BkgColors class to set color. Default is BkgColors.GREY.
  • transparency: Background transparency of the notification. Use Transparencies class. Default is Transparencies._0_PERCENT.
  • interrupt: Setting it to True makes the notification interactive and can be dismissed or selected to display more details. Default is False
  • icon: Can be str represnting the file path or an ImageUrlSource that includes the url and authentication params to fetch the image from a url.
  • image_file: Can be str represnting the file path or an ImageUrlSource 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

notifications_android_tv-1.2.2.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

notifications_android_tv-1.2.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file notifications_android_tv-1.2.2.tar.gz.

File metadata

  • Download URL: notifications_android_tv-1.2.2.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.14 Linux/6.5.0-1022-azure

File hashes

Hashes for notifications_android_tv-1.2.2.tar.gz
Algorithm Hash digest
SHA256 1d643ddefebfd6f3fb6b833b1994a82cc7b159232ede08bf9571ba6aa1a3bd1c
MD5 b26e5358bc447b24e5cbc5d5ee7c885f
BLAKE2b-256 c4e07609d9b0f1898104c33edabadd3387eb964f39791e2febd3d3581a1c944e

See more details on using hashes here.

File details

Details for the file notifications_android_tv-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for notifications_android_tv-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7da7c5ae9433bf649330f63a4cbbfae8ff722a43171fbfdd2ad36899da9d087e
MD5 29565bd23d3bae0752f9dbc1f76235b3
BLAKE2b-256 abc636597c16fd057ed381458fb99c934613726f6f948a570f14234cd09a0c26

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page