bendavid / aiopylgtv

Library to control webOS based LG Tv devices
MIT License
143 stars 47 forks source link

How to retrieve Picture Settings #29

Closed helgek closed 3 years ago

helgek commented 3 years ago

Hi,

I'm a total Python dummy. Can you please help me on how I can retrieve the current picture settings. I wasn't successful with these attempts:

import asyncio`
from aiopylgtv import WebOsClient

async def runloop():
    client = await WebOsClient.create('192.168.0.60')
    await client.disconnect()    
    await client.connect()
    await client.start_calibration(picMode="game")
    print(client.set_oled_light)
    #print(client.get_picture_settings("backlight"))
    await client.disconnect()

asyncio.run(runloop())

Thanks!! Helge

helgek commented 3 years ago

Solved it myself unexpectedly - still a Python dummy though... :D

This did it:

import asyncio from aiopylgtv import WebOsClient

async def runloop():
    client = await WebOsClient.create('192.168.0.60')
    await client.disconnect()    
    await client.connect()
    await client.start_calibration(picMode="game") 
    #print(client.set_oled_light(picMode="game", value=50))
    test = await client.get_picture_settings()
    print(test)
    await client.disconnect()

asyncio.run(runloop())