diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2023-07-09 19:37:37 +0200 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2023-07-09 19:37:37 +0200 |
commit | b966f6e4705a813dad13b242e9592e699566d9c9 (patch) | |
tree | fba1a57bf3ed01b7826487c98f000ae9f111cf20 /examples/gen.py | |
download | ShellyPy-rewrite.tar.gz ShellyPy-rewrite.zip |
Squash rewriterewrite
Diffstat (limited to 'examples/gen.py')
-rw-r--r-- | examples/gen.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/gen.py b/examples/gen.py new file mode 100644 index 0000000..84c5316 --- /dev/null +++ b/examples/gen.py @@ -0,0 +1,10 @@ +import ShellyPy + +# Automatically detect device generation and return the right class +device = ShellyPy.api.Device.connect("192.0.0.20") + +# Explicitly connect a Generation 1 Device +device_gen1 = ShellyPy.api.gen1.Device.connect("192.0.0.21") + +# Explicitly connect a Generation 2 Device +device_gen2 = ShellyPy.api.gen2.Device.connect("192.0.0.22") |