googledevices

Build Status PyPI version Get information from, and control various Google devices.


HOME PLATFORMS CLASSES METHODS FUNCTIONS CLI

Cast - Info - set_eureka_info

This takes one required parameter.
This needs to be formated like this:

{
  "name": "Living Room",
  "settings": {
    "control_notifications": 2
  },
  "opt_in": {
    "opencast": true,
    "preview_channel": true,
    "remote_ducking": true,
    "stats": true
  }
}

Sample usage:

from googledevices.api.connect import Cast
from googledevices.helpers import gdh_session, gdh_loop
from googledevices.utils.convert import format_json

CAST_HOST = '192.168.2.241'
LOOP = gdh_loop()

async def sample():
    """Sample usage."""
    async with gdh_session() as session:
        sample_class = await Cast(CAST_HOST, LOOP, session).settings()
        data = {}
        test = await sample_class.set_eureka_info(data)
        print(format_json(test))
LOOP.run_until_complete(sample())