diff options
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") |