-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
124 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,8 @@ on: | |
branches: [ "master", "dev" , "experimental" ] | ||
|
||
jobs: | ||
tests: | ||
name: documentation check | ||
readme_check: | ||
name: Readme check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
|
@@ -16,3 +16,25 @@ jobs: | |
run: python docs/script/make_doc.py README.tmp | ||
- name: Compare temp file with readme.rst | ||
run: diff -u --strip-trailing-cr README.rst README.tmp | ||
hon_examples_check: | ||
name: Check hon_example | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
- name: Show current folder | ||
run: ls | ||
- name: Run script and save results | ||
run: python docs/script/process_examples.py ../examples/hon_example.rst ../hon_example.tmp | ||
- name: Compare temp file with hon_example.rst | ||
run: diff -u --strip-trailing-cr docs/hon_example.rst docs/hon_example.tmp | ||
smartair2_examples_check: | ||
name: Check smartair2_example | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
- name: Run script and save results | ||
run: python docs/script/process_examples.py docs/examples/smartair2_example.rst docs/smartair2_example.tmp | ||
- name: Compare temp file with smartair2_example.rst | ||
run: diff -u --strip-trailing-cr docs/smartair2_example.rst docs/smartair2_example.tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,13 +22,13 @@ jobs: | |
|
||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
- name: Install esphome | ||
run: pip3 install -U esphome | ||
- name: Version esphome | ||
run: esphome version | ||
- name: Prepering test file | ||
run: cat .base.yaml ${{ matrix.file }} > __test__.yaml | ||
- name: Build ESPHome config | ||
run: esphome compile __test__.yaml | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
- name: Install esphome | ||
run: pip3 install -U esphome | ||
- name: Version esphome | ||
run: esphome version | ||
- name: Prepering test file | ||
run: cat docs/examples/.base.yaml ${{ matrix.file }} > __test__.yaml | ||
- name: Build ESPHome config | ||
run: esphome compile __test__.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ logger: | |
wifi: | ||
ssid: test_ssid | ||
password: test_pass | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Example of climate configuration for hOn protocol | ||
================================================= | ||
|
||
Configuration of your climate will depend on capabilities specific model. | ||
|
||
Minimal configuration will look like this: | ||
|
||
.. example_yaml:: examples/min-hon.yaml | ||
|
||
Maximum configuration witch will use all possible options will look like this: | ||
|
||
.. example_yaml:: examples/max-hon.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
uart: | ||
uart: | ||
baud_rate: 9600 | ||
tx_pin: 17 | ||
rx_pin: 16 | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Example of climate configuration for smartair2 protocol | ||
======================================================= | ||
|
||
Configuration of your climate will depend on capabilities specific model. | ||
|
||
Minimal configuration will look like this: | ||
|
||
.. example_yaml:: examples/min-smartair2.yaml | ||
|
||
Maximum configuration witch will use all possible options will look like this: | ||
|
||
.. example_yaml:: examples/max-smartair2.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import sys | ||
import re | ||
|
||
document_header = [ | ||
".. This file is automatically generated by ./docs/script/make_doc.py Python script.\n", | ||
" Please, don't change. In case you need to make corrections or changes change\n", | ||
" source documentation in ./doc folder or script.\n\n" | ||
] | ||
|
||
if len(sys.argv) < 3: | ||
print("Usage: python process_examples.py <input_file> <output_file>") | ||
sys.exit(1) | ||
|
||
input_file = sys.argv[1] | ||
output_file = sys.argv[2] | ||
|
||
with open(input_file, "r") as f: | ||
ofile = open(output_file, "w") | ||
lines = f.readlines() | ||
ofile.writelines(document_header) | ||
for line in lines: | ||
m = re.match(r"^.. example_yaml:: ([^\n]+)", line) | ||
if m: | ||
print("Processing example: " + m.group(1)) | ||
ofile.write(".. code-block:: yaml\n\n") | ||
example = open(m.group(1), "r") | ||
for l in example.readlines(): | ||
ofile.write(" " + l) | ||
ofile.write("\n") | ||
else: | ||
ofile.write(line) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters