Skip to content

Commit

Permalink
Bump version to 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
qqaatw committed Apr 1, 2022
1 parent 01e1f02 commit 40a5e30
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 24 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
__pycache__
.vscode
.pytest_cache
.coverage
coverage.xml

/dist
Expand Down
2 changes: 1 addition & 1 deletion JciHitachi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__author__ = "Allan Lin"
__version__ = "0.4.7"
__version__ = "0.5.0"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2020 qqaatw.
Copyright 2022 qqaatw.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
# -- Project information -----------------------------------------------------

project = 'LibJciHitachi'
copyright = '2021, Allan Lin'
copyright = '2022, Allan Lin'
author = 'Allan Lin'

# The full version, including alpha/beta/rc tags
release = 'v0.4.7'
release = 'v0.5.0'


# -- General configuration ---------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/source/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
```
# Set device status
# For available command names and values, please refer to
# model.py->JciHitachiAWSStatus.compatibility_mapping
if api.set_status('TemperatureSetting', 27, DEVICENAME):
# model.py->STATUS_DICT
if api.set_status(status_name='TemperatureSetting', device_name=DEVICENAME, status_value=27):
print('Success')
else:
print('Failed')
Expand Down
40 changes: 22 additions & 18 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,28 @@
PASSWORD = "password"
DEVICENAME = "living room"

# Login
api = JciHitachiAWSAPI(EMAIL, PASSWORD, DEVICENAME)
api.login()
def main():
# Login
api = JciHitachiAWSAPI(EMAIL, PASSWORD, DEVICENAME)
api.login()

# Check device status
# device_status = api.get_status(legacy=True) # return legacy status class
device_status = api.get_status()
print(device_status[DEVICENAME].status)
# Check device status
# device_status = api.get_status(legacy=True) # return legacy status class
device_status = api.get_status()
print(device_status[DEVICENAME].status)

# Set device status
# For available command names and values, please refer to
# model.py->JciHitachiAWSStatus.compatibility_mapping
if api.set_status('TemperatureSetting', 27, DEVICENAME):
print('Success')
else:
print('Failed')
# Set device status
# For available command names and values, please refer to
# model.py->STATUS_DICT
if api.set_status(status_name='TemperatureSetting', device_name=DEVICENAME, status_value=27):
print('Success')
else:
print('Failed')

# Check the updated device status
api.refresh_status()
device_status = api.get_status()
print(device_status[DEVICENAME].status)
# Check the updated device status
api.refresh_status()
device_status = api.get_status()
print(device_status[DEVICENAME].status)

if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def test_incorrect_credential(self, fixture_mqtt):
fixture_mqtt.configure()
fixture_mqtt.connect()


class TestACStatus:
@pytest.mark.slow("online test is a slow test.")
def test_online(self, fixture_api):
Expand Down

0 comments on commit 40a5e30

Please sign in to comment.