File: setlimits.py

package info (click to toggle)
pyvlx 0.2.32-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,616 kB
  • sloc: python: 9,114; makefile: 53; sh: 5
file content (21 lines) | stat: -rw-r--r-- 576 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""Just a demo of the new PyVLX module."""
import asyncio

from pyvlx import Position, PyVLX


async def main() -> None:
    """Demonstrate functionality of setting a limit."""
    pyvlx = PyVLX('pyvlx.yaml')

    # Runing scenes:
    await pyvlx.load_nodes()
    await pyvlx.nodes['Bath'].set_position_limitations(position_max=Position(position_percent=30))
    await pyvlx.nodes['Bath'].close()
    await pyvlx.nodes['Bath'].clear_position_limitations()
    await pyvlx.nodes['Bath'].close()

    await pyvlx.disconnect()

if __name__ == '__main__':
    asyncio.run(main())