Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <access_token_setup>` 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:

Expand Down
4 changes: 1 addition & 3 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Client
--------

.. autoclass:: homeassistant_api.Client
:members:
:inherited-members:
:show-inheritance:


Data Models
Expand Down Expand Up @@ -50,12 +50,10 @@ Processing


.. autoclass:: homeassistant_api.processing.Processing
:members:


Exceptions
-----------

.. automodule:: homeassistant_api.errors
:members:

16 changes: 16 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"resourcelinks",
"sphinx_autodoc_typehints",
"sphinxcontrib.autodoc_pydantic",
"sphinx.ext.intersphinx",
]

resource_links = {
Expand Down Expand Up @@ -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
)
}
6 changes: 3 additions & 3 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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 <api.html>`_
* `Advanced Section <advanced.html>`_
4 changes: 2 additions & 2 deletions homeassistant_api/rawclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down