Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
* admonitions styles
* add device re-write some stuff
  • Loading branch information
xZetsubou authored Nov 24, 2023
1 parent f6af18b commit 25d4787
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
18 changes: 9 additions & 9 deletions documentation/docs/configure_add_device.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[TinyTuya](https://pypi.org/project/tinytuya/.){target=_blank},
or [MarkVideo](https://www.youtube.com/watch?v=YKvGYXw-_cE){target=_blank}.

!!! failure ""
!!! danger "Important"
Before adding any device, ensure that `Smart Life` and `Tuya Smart` apps are closed on your phones. Devices shouldn't be added to different local integrations as __some__ Tuya devices can only accept one local connection at a time.

After setting up the integration, you can now manage your devices by `adding` or `editing`<br>
Expand Down Expand Up @@ -68,28 +68,28 @@ Go to hub `Configure` (1) a menu will show up (2) Choose `Add new device`

### Configure device methods
!!! Abstract "How does localtuya work"
Before configuring device entities, this is how `LocalTuya` control devices: Tuya devices encompass various functions like Switch 1, Switch 2, and more, each identified by a DP ID. LocalTuya configures entities by utilizing and managing the function values using their respective DP IDs.<br>
__LocalTuya will pull these functions for you to set them up as Home Assistant entities__
Before setting up device entities, let me explain how `LocalTuya` control devices: Tuya devices have different functions such as Switch 1, Switch 2, and more, each identified by a DP ID. `LocalTuya` configures entities by using and managing the function values using their respective DP IDs.<br>
_LocalTuya will pull these functions for you to set them up as Home Assistant entities_

#### Discover device entities automatically
??? info "Discover device entities automatically"
!!! quote ""
Automatic setup is only supported for CloudAPI setup.<br>
It's possible to tweak the entities config later after auto configure.
Note: It's possible to tweak the entities config later after auto configure.

<br>

#### Configure device entities manually
!!! note ""
The example below uses a `2 Gang Tuya Switch`
Below, I used `2 Gang Tuya Switch` as an example
This option will work for everyone, but it's more advanced.

1. Selecting the manual setup option will bring up a new page listing supported platforms `platforms` (1)
Each platform features its unique configuration page with different sets of configuration fields. <br> <br>
Each platform has its unique configuration page with different sets of configuration fields. <br> <br>
{.annotate}

1. ![](images/opt_configure_entity.png)

2. Configure `switch` (1). You can modify all fields later, except for the `ID`
2. Configure `switch platform` (1)
{.annotate}

1. ![](images/opt_configure_switch_ex.png)
Expand Down Expand Up @@ -122,7 +122,7 @@ Each platform features its unique configuration page with different sets of conf
!!! info ""
I unchecked `Finish configuring entities` and repeated `step 2` to add another `switch` entity that controls `ID 2` <- `2nd Gang switch`

4. After completing the addition of entities, check 'Finish configuring entities' and submit to add your device and entities
4. After completing the addition of entities, check `Finish configuring entities` and submit to add your device and entities
<br>

#### Use saved template
Expand Down
Binary file added documentation/docs/images/Thumbs.db
Binary file not shown.
Binary file added documentation/docs/images/dev/Thumbs.db
Binary file not shown.
6 changes: 6 additions & 0 deletions documentation/docs/style/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.md-typeset .admonition ,
.md-typeset details {
border-width: 0;
border-radius: 0;
border-left-width: 3.5px;
}
3 changes: 3 additions & 0 deletions documentation/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ nav:
- Development:
- auto_configure.md

extra_css:
- style/extra.css

markdown_extensions:
- admonition
- attr_list
Expand Down

0 comments on commit 25d4787

Please sign in to comment.