HomeAssistant-API 4.0.0__tar.gz → 4.0.0.post1__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 (21) hide show
  1. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/PKG-INFO +1 -1
  2. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/homeassistant_api/models/domains.py +7 -4
  3. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/pyproject.toml +3 -2
  4. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/setup.py +1 -1
  5. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/LICENSE +0 -0
  6. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/README.md +0 -0
  7. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/homeassistant_api/__init__.py +0 -0
  8. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/homeassistant_api/client.py +0 -0
  9. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/homeassistant_api/errors.py +0 -0
  10. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/homeassistant_api/models/__init__.py +0 -0
  11. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/homeassistant_api/models/base.py +0 -0
  12. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/homeassistant_api/models/entity.py +0 -0
  13. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/homeassistant_api/models/events.py +0 -0
  14. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/homeassistant_api/models/history.py +0 -0
  15. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/homeassistant_api/models/logbook.py +0 -0
  16. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/homeassistant_api/models/states.py +0 -0
  17. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/homeassistant_api/processing.py +0 -0
  18. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/homeassistant_api/py.typed +0 -0
  19. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/homeassistant_api/rawasyncclient.py +0 -0
  20. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/homeassistant_api/rawbaseclient.py +0 -0
  21. {HomeAssistant-API-4.0.0 → HomeAssistant-API-4.0.0.post1}/homeassistant_api/rawclient.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: homeassistant-api
3
- Version: 4.0.0
3
+ Version: 4.0.0.post1
4
4
  Summary: Python Wrapper for Homeassistant's REST API
5
5
  Home-page: https://github.com/GrandMoff100/HomeAssistantAPI
6
6
  License: GPL-3.0-or-later
@@ -111,8 +111,11 @@ class Service(BaseModel):
111
111
  """Triggers the service associated with this object."""
112
112
  assert (frame := inspect.currentframe()) is not None
113
113
  assert (parent_frame := frame.f_back) is not None
114
- if inspect.iscoroutinefunction(
115
- caller := gc.get_referrers(parent_frame.f_code)[0]
116
- ) or inspect.iscoroutine(caller):
117
- return self.async_trigger(**service_data)
114
+ try:
115
+ if inspect.iscoroutinefunction(
116
+ caller := gc.get_referrers(parent_frame.f_code)[0]
117
+ ) or inspect.iscoroutine(caller):
118
+ return self.async_trigger(**service_data)
119
+ except IndexError: # pragma: no cover
120
+ pass
118
121
  return self.trigger(**service_data)
@@ -18,7 +18,7 @@ name = "HomeAssistant-API"
18
18
  readme = "README.md"
19
19
  include = ["homeassistant_api/py.typed"]
20
20
  repository = "https://github.com/GrandMoff100/HomeAssistantAPI"
21
- version = "4.0.0"
21
+ version = "4.0.0.post1"
22
22
  packages = [{ include = "homeassistant_api" }]
23
23
 
24
24
  [tool.poetry.dependencies]
@@ -78,5 +78,6 @@ exclude_lines = [
78
78
  "raise RequestTimeoutError\\(",
79
79
  "except \\(json\\.decoder\\.JSONDecodeError, simplejson.decoder\\.JSONDecodeError\\) as err:",
80
80
  "pass",
81
- "last_updated < \\(now := datetime\\.now\\(\\)\\) - wait"
81
+ "last_updated < \\(now := datetime\\.now\\(\\)\\) - wait",
82
+ "pragma: no cover"
82
83
  ]
@@ -17,7 +17,7 @@ install_requires = \
17
17
 
18
18
  setup_kwargs = {
19
19
  'name': 'homeassistant-api',
20
- 'version': '4.0.0',
20
+ 'version': '4.0.0.post1',
21
21
  'description': "Python Wrapper for Homeassistant's REST API",
22
22
  'long_description': '# HomeassistantAPI\n\n[![Code Coverage](https://img.shields.io/codecov/c/github/GrandMoff100/HomeAssistantAPI/dev?style=for-the-badge&token=SJFC3HX5R1)](https://codecov.io/gh/GrandMoff100/HomeAssistantAPI)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/HomeAssistant-API?style=for-the-badge)](https://pypi.org/project/homeassistant_api)\n![GitHub commits since latest release (by date including pre-releases)](https://img.shields.io/github/commits-since/GrandMoff100/HomeassistantAPI/latest/dev?include_prereleases&style=for-the-badge)\n[![Read the Docs (version)](https://img.shields.io/readthedocs/homeassistantapi?style=for-the-badge)](https://homeassistantapi.readthedocs.io/en/latest/?badge=latest)\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/GrandMoff100/HomeassistantAPI?style=for-the-badge)](https://github.com/GrandMoff100/HomeassistantAPI/releases)\n\n[![Home Assistant Logo](https://github.com/GrandMoff100/HomeAssistantAPI/blob/7edb4e6298d37bda19c08b807613c6d351788491/docs/images/homeassistant-logo.png?raw=true)](https://home-assistant.io)\n\n## Python wrapper for Homeassistant\'s [REST API](https://developers.home-assistant.io/docs/api/rest/)\n\nHere is a quick example.\n\n```py\nfrom homeassistant_api import Client\n\nwith Client(\n \'<API Server URL>\',\n \'<Your Long Lived Access-Token>\'\n) as client:\n\n light = client.get_domain("light")\n\n light.turn_on(entity_id="light.living_room_lamp")\n```\n\nAll the methods also support async!\n\n## Documentation\n\nAll documentation, API reference, contribution guidelines and pretty much everything else\nyou\'d want to know is on our readthedocs site [here](https://homeassistantapi.readthedocs.io)\n\nIf there is something missing, open an issue and let us know! Thanks!\n\nGo make some cool stuff! Maybe come back and tell us about it in a\n[discussion](https://github.com/GrandMoff100/HomeAssistantAPI/discussions)?\nWe\'d love to hear about how you use our library!!\n\n## License\n\nThis project is under the GNU GPLv3 license, as defined by the Free Software Foundation.\n',
23
23
  'author': 'GrandMoff100',