Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

Commit

Permalink
set variable
Browse files Browse the repository at this point in the history
  • Loading branch information
pvizeli committed Aug 9, 2016
1 parent 5bc1892 commit de692d7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ def eventcallback(address, interface_id, key, value):
@click.option("--debug", "-d", is_flag=True, help="Use DEBUG instead INFO for logger")
@click.option("--user", "-u", default="Admin", help="Username")
@click.option("--password", "-p", default="", help="Password")
@click.option("--variable", "-v", default=None, help="Variable for set data")
@click.option("--data", "-vd", default=None, help="Input data for variable")
def cli(local, localport, remote, remoteport, address, channel, state, toggle,
timer, debug, user, password):
timer, debug, user, password, variable, data):

# debug?
if debug:
Expand Down Expand Up @@ -67,6 +69,9 @@ def cli(local, localport, remote, remoteport, address, channel, state, toggle,
# read system variables
print("******************************")
print("Read all: %s" % str(pyhomematic.getAllSystemVariables()))
if variable is not None:
pyhomematic.setSystemVariable(variable, data)
print("Read: %s" % str(pyhomematic.getSystemVariable(variable)))
print("******************************")

# need test a hm object?
Expand Down

0 comments on commit de692d7

Please sign in to comment.