Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial on how to get the current state of the device #73

Open
carlosgamezvillegas opened this issue Feb 6, 2025 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@carlosgamezvillegas
Copy link

Hello @Lash-L ,

Is your feature request related to a problem? Please describe.
I am new at using code from other people so I don't know how what are the steps necessary to query the state of the device.

Describe the solution you'd like
Could you please add a tiny tutorial on how to start with this module?
here is an example from VeSync:

from pyvesync import VeSync

manager = VeSync("EMAIL", "PASSWORD", "TIME_ZONE", debug=False, redact=True)
manager.login()

debug and redact are optional arguments, the above values are their defaults

Get/Update Devices from server - populate device lists

manager.update()

my_switch = manager.outlets[0]

Turn on the first switch

my_switch.turn_on()

Turn off the first switch

my_switch.turn_off()

Get energy usage data for outlets

manager.update_energy()

Set bulb brightness to 75% of first bulb in the list

my_bulb = manager.bulbs[0]
my_bulb.set_brightness(75)

get its details in JSON and print

print(my_bulb.displayJSON())

Additional context
Add any other context or screenshots about the feature request here.

Thank you,

Carlos Gamez

@carlosgamezvillegas carlosgamezvillegas added the enhancement New feature or request label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant