python-openhab-rest-client 0.2.3__tar.gz → 0.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. {python_openhab_rest_client-0.2.3/python_openhab_rest_client.egg-info → python_openhab_rest_client-0.2.4}/PKG-INFO +1 -1
  2. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Rules.py +2 -2
  3. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Rules.py +8 -8
  4. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4/python_openhab_rest_client.egg-info}/PKG-INFO +1 -1
  5. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/setup.py +1 -1
  6. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Rules.py +1 -1
  7. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/LICENSE +0 -0
  8. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/README.md +0 -0
  9. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Actions.py +0 -0
  10. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Addons.py +0 -0
  11. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Audio.py +0 -0
  12. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Auth.py +0 -0
  13. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/ChannelTypes.py +0 -0
  14. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Client.py +0 -0
  15. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/ConfigDescriptions.py +0 -0
  16. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Discovery.py +0 -0
  17. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Events.py +0 -0
  18. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Iconsets.py +0 -0
  19. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Inbox.py +0 -0
  20. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Items.py +0 -0
  21. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Links.py +0 -0
  22. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Logging.py +0 -0
  23. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/ModuleTypes.py +0 -0
  24. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Persistence.py +0 -0
  25. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/ProfileTypes.py +0 -0
  26. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Services.py +0 -0
  27. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Sitemaps.py +0 -0
  28. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Systeminfo.py +0 -0
  29. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Tags.py +0 -0
  30. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Templates.py +0 -0
  31. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/ThingTypes.py +0 -0
  32. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Things.py +0 -0
  33. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Transformations.py +0 -0
  34. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/UI.py +0 -0
  35. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/UUID.py +0 -0
  36. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/Voice.py +0 -0
  37. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/__init__.py +0 -0
  38. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Actions.py +0 -0
  39. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Addons.py +0 -0
  40. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Audio.py +0 -0
  41. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Auth.py +0 -0
  42. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/ChannelEvents.py +0 -0
  43. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/ChannelTypes.py +0 -0
  44. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/ConfigDescriptions.py +0 -0
  45. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Discovery.py +0 -0
  46. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Events.py +0 -0
  47. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Iconsets.py +0 -0
  48. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Inbox.py +0 -0
  49. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/InboxEvents.py +0 -0
  50. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/ItemEvents.py +0 -0
  51. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Items.py +0 -0
  52. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/LinkEvents.py +0 -0
  53. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Links.py +0 -0
  54. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Logging.py +0 -0
  55. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/ModuleTypes.py +0 -0
  56. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Persistence.py +0 -0
  57. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/ProfileTypes.py +0 -0
  58. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Services.py +0 -0
  59. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Sitemaps.py +0 -0
  60. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Systeminfo.py +0 -0
  61. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Tags.py +0 -0
  62. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Templates.py +0 -0
  63. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/ThingEvents.py +0 -0
  64. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/ThingTypes.py +0 -0
  65. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Things.py +0 -0
  66. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Transformations.py +0 -0
  67. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/UI.py +0 -0
  68. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/UUID.py +0 -0
  69. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/Voice.py +0 -0
  70. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/openhab/tests/__init__.py +0 -0
  71. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/python_openhab_rest_client.egg-info/SOURCES.txt +0 -0
  72. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/python_openhab_rest_client.egg-info/dependency_links.txt +0 -0
  73. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/python_openhab_rest_client.egg-info/requires.txt +0 -0
  74. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/python_openhab_rest_client.egg-info/top_level.txt +0 -0
  75. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/setup.cfg +0 -0
  76. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Actions.py +0 -0
  77. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Addons.py +0 -0
  78. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Audio.py +0 -0
  79. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Auth.py +0 -0
  80. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/ChannelEvents.py +0 -0
  81. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/ChannelTypes.py +0 -0
  82. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/ConfigDescriptions.py +0 -0
  83. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Discovery.py +0 -0
  84. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Events.py +0 -0
  85. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Iconsets.py +0 -0
  86. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Inbox.py +0 -0
  87. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/InboxEvents.py +0 -0
  88. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/ItemEvents.py +0 -0
  89. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Items.py +0 -0
  90. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/LinkEvents.py +0 -0
  91. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Links.py +0 -0
  92. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Logging.py +0 -0
  93. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/ModuleTypes.py +0 -0
  94. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Persistence.py +0 -0
  95. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/ProfileTypes.py +0 -0
  96. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Services.py +0 -0
  97. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Sitemaps.py +0 -0
  98. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Systeminfo.py +0 -0
  99. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Tags.py +0 -0
  100. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Templates.py +0 -0
  101. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/ThingEvents.py +0 -0
  102. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/ThingTypes.py +0 -0
  103. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Things.py +0 -0
  104. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Transformations.py +0 -0
  105. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/UI.py +0 -0
  106. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/UUID.py +0 -0
  107. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/Voice.py +0 -0
  108. {python_openhab_rest_client-0.2.3 → python_openhab_rest_client-0.2.4}/tests/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-openhab-rest-client
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: A Python client for the openHAB REST API. This library enables easy interaction with the openHAB REST API to control smart home devices, retrieve status information, and process events.
5
5
  Home-page: https://github.com/Michdo93/python-openhab-rest-client
6
6
  Author: Michael Christian Dörflinger
@@ -503,10 +503,10 @@ class Rules:
503
503
 
504
504
  return {"error": f"Unexpected response: {status_code}"}
505
505
 
506
- def enableRule(self, ruleUID: str):
506
+ def enable(self, ruleUID: str):
507
507
  return self.setRuleState(ruleUID, True)
508
508
 
509
- def disableRule(self, ruleUID: str):
509
+ def disable(self, ruleUID: str):
510
510
  return self.setRuleState(ruleUID, False)
511
511
 
512
512
  def runNow(self, ruleUID: str, contextData: dict = None):
@@ -46,8 +46,8 @@ class RulesTest:
46
46
  print("\n~~~~ Test #4 updateRule(ruleID, ruleData) ~~~~\n")
47
47
 
48
48
  try:
49
- self.rulesAPI.updateRule(ruleID, ruleData)
50
- print("Rule updated successfully.")
49
+ rule = self.rulesAPI.updateRule(ruleID, ruleData)
50
+ print(json.dumps(rule, indent=4))
51
51
  except Exception as e:
52
52
  print(f"Error updating rule {ruleID}: {e}")
53
53
 
@@ -57,8 +57,8 @@ class RulesTest:
57
57
  print("\n~~~~ Test #5 setRuleState(ruleID, state) ~~~~\n")
58
58
 
59
59
  try:
60
- self.rulesAPI.setRuleState(ruleID, state)
61
- print(f"Rule {ruleID} {action}.")
60
+ rule = self.rulesAPI.setRuleState(ruleID, state)
61
+ print(json.dumps(rule, indent=4))
62
62
  except Exception as e:
63
63
  print(f"Error setting rule state for {ruleID}: {e}")
64
64
 
@@ -67,8 +67,8 @@ class RulesTest:
67
67
  print("\n~~~~ Test #6 deleteRule(ruleID) ~~~~\n")
68
68
 
69
69
  try:
70
- self.rulesAPI.deleteRule(ruleID)
71
- print("Rule deleted successfully.")
70
+ rule = self.rulesAPI.deleteRule(ruleID)
71
+ print(json.dumps(rule, indent=4))
72
72
  except Exception as e:
73
73
  print(f"Error deleting rule {ruleID}: {e}")
74
74
 
@@ -77,7 +77,7 @@ class RulesTest:
77
77
  print("\n~~~~ Test #7 runNow(ruleID) ~~~~\n")
78
78
 
79
79
  try:
80
- self.rulesAPI.runNow(ruleID, contextData)
81
- print("Rule executed successfully.")
80
+ rule = self.rulesAPI.runNow(ruleID, contextData)
81
+ print(json.dumps(rule, indent=4))
82
82
  except Exception as e:
83
83
  print(f"Error executing rule {ruleID}: {e}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-openhab-rest-client
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: A Python client for the openHAB REST API. This library enables easy interaction with the openHAB REST API to control smart home devices, retrieve status information, and process events.
5
5
  Home-page: https://github.com/Michdo93/python-openhab-rest-client
6
6
  Author: Michael Christian Dörflinger
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="python-openhab-rest-client",
5
- version="0.2.3",
5
+ version="0.2.4",
6
6
  packages=find_packages(),
7
7
  install_requires=[
8
8
  "requests"
@@ -18,7 +18,7 @@ if __name__ == "__main__":
18
18
  # Example rule data
19
19
  ruleID = "test_color-4"
20
20
  newRuleData = {
21
- "uid": "newRule" + random_number,
21
+ "uid": "newRule" + str(random_number),
22
22
  "name": "New Rule",
23
23
  "description": "This is a new rule",
24
24
  "triggers": [],