diff --git a/docs/CONTRIBUTING.rst b/docs/CONTRIBUTING.rst index 3a1b4f75..d5946c0d 100644 --- a/docs/CONTRIBUTING.rst +++ b/docs/CONTRIBUTING.rst @@ -57,7 +57,7 @@ Testing In order to test your changes you need to have an API URL, and a Long Lived Access Token. Follow the :ref:`Quickstart Section ` for getting those. If you setup the Development Environment then your API URL will most likely be something along the lines of :code:`https://localhost:8123/api`. -Then you can test your changes by passing the API URL, and Long Lived Access Token to the :code:`Client` object. +Then you can test your changes by passing the API URL, and Long Lived Access Token to the :class:`homeassistant_api.Client` object. .. _styling: diff --git a/docs/api.rst b/docs/api.rst index 7714094d..a12c986f 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -5,8 +5,8 @@ Client -------- .. autoclass:: homeassistant_api.Client - :members: :inherited-members: + :show-inheritance: Data Models @@ -50,12 +50,10 @@ Processing .. autoclass:: homeassistant_api.processing.Processing - :members: Exceptions ----------- .. automodule:: homeassistant_api.errors - :members: diff --git a/docs/conf.py b/docs/conf.py index 1455c8cd..c7999dae 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,6 +48,7 @@ "resourcelinks", "sphinx_autodoc_typehints", "sphinxcontrib.autodoc_pydantic", + "sphinx.ext.intersphinx", ] resource_links = { @@ -79,3 +80,18 @@ html_css_files = ["css/custom.css"] html_favicon = "./images/favicon.png" +autodoc_typehints = "signature" +autodoc_default_options = { + "members": True, + "member-order": "bysource", +} +intersphinx_mapping = { + "python": ( + "https://docs.python.org/3", + None, + ), + "homeassistant_api": ( + "https://homeassistantapi.readthedocs.io/en/latest", + None + ) +} diff --git a/docs/usage.rst b/docs/usage.rst index ce90e40b..5929b1c8 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -6,9 +6,9 @@ Usage The Basics... ################# -This library is centered around the :code:`Client` class. +This library is centered around the :class:`Client` class. Once you have have your api base url and Long Lived Access Token from Home Assistant we can start to do stuff. -The rest of this guide assumes you have the :code:`Client` saved to a :code:`client` variable. +The rest of this guide assumes you have the :class:`Client` saved to a :code:`client` variable. Most of these examples require some integrations to be setup inside Home Assistant for the examples to actually work. The most commonly used features of this library include triggering services and getting and modifying entity states. @@ -153,7 +153,7 @@ Entities What's Next? ############# -Browse below to learn more about what you can do with :code:`homeassistant_api`. +Browse below to learn more about what you can do with :mod:`homeassistant_api`. * `API Reference `_ * `Advanced Section `_ diff --git a/homeassistant_api/rawclient.py b/homeassistant_api/rawclient.py index dd3d9b89..979015ce 100644 --- a/homeassistant_api/rawclient.py +++ b/homeassistant_api/rawclient.py @@ -237,8 +237,8 @@ def set_state( # pylint: disable=duplicate-code **payload, ) -> State: """ - Sets the state of an entity and it does not have to be backed by a real entity. - Returns the new state afterwards. + This method sets the representation of a device within Home Assistant and will not communicate with the actual device. + To communicate with the device, use :py:meth:`homeassistant_api.Service.trigger` or :py:meth:`homeassistant_api.AsyncService.trigger` """ entity_id = self.prepare_entity_id( group=group,