Skip to content

Commit e6be8c8

Browse files
committed
openhab tutorial half complete
1 parent 197d707 commit e6be8c8

16 files changed

+208
-55
lines changed

README.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ Introduction
1111
.. image:: https://codecov.io/gh/2bndy5/CircuitPython_Homie/branch/main/graph/badge.svg?token=FOEW7PBQG8
1212
:target: https://codecov.io/gh/2bndy5/CircuitPython_Homie
1313
:alt: Test Code Coverage
14+
.. image:: https://static.pepy.tech/personalized-badge/circuitpython-homie?period=total&units=international_system&left_color=grey&right_color=blue&left_text=PyPI%20Downloads
15+
:target: https://pepy.tech/project/circuitpython-homie
1416

1517
Homie v4 specifications for MQTT implemented in CircuitPython
1618

1719
.. image:: https://homieiot.github.io/img/works-with-homie.svg
1820
:alt: Works with MQTT Homie
1921
:target: https://homieiot.github.io/
20-
:width: 50%
2122

2223
Dependencies
2324
------------

circuitpython_homie/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,10 +404,11 @@ def set_property(self, prop: HomieProperty, value, multi_node: bool = False):
404404
405405
:param prop: the instance object representing the device node's property.
406406
:param value: The new value for the property. The data type passed here will
407-
depend on type of `HomieProperty` (specified by the ``prop`` parameter) for
408-
which it is being applied.
407+
depend on the type of `HomieProperty` (specified by the ``prop`` parameter)
408+
for which it is being applied.
409409
410-
.. seealso:: The :doc:`recipes` have validators implemented accordingly.
410+
.. seealso:: The :doc:`recipes` have derivatives of the `HomieProperty`
411+
class with validators implemented accordingly.
411412
:param multi_node: Set this to `True` if the property is associated with
412413
multiple device `nodes`. By default, only the first node found in
413414
association is updated on the MQTT broker.

circuitpython_homie/recipes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ class PropertyBool(HomieProperty):
243243
|param_intro|
244244
245245
- `datatype` attribute is set to :python:`"boolean"` |param_immutable|
246-
- ``init_value`` is set to :python:`"false"` |param_mutable|
246+
- ``init_value`` is set to `False` |param_mutable|
247247
"""
248248

249249
def __init__(

docs/_static/extra_css.css

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,32 @@
33
float: right;
44
}
55

6-
.code.homie-attr::before {
6+
code.literal.homie-attr::before {
77
content: "$";
88
}
99

10-
.code.homie-attr {
10+
code.literal.homie-attr {
1111
color: var(--md-code-hl-special-color);
1212
}
1313

14-
.code.homie-val {
14+
code.literal.homie-val {
1515
color: var(--md-code-hl-keyword-color);
1616
}
1717

18-
.code.homie-dev,
19-
.code.homie-node,
20-
.code.homie-prop {
18+
code.literal.homie-dev,
19+
code.literal.homie-node,
20+
code.literal.homie-prop {
2121
color: var(--md-code-hl-string-color);
2222
}
2323

24-
.topic-list li::marker {
24+
.topic-list > ul li::marker {
2525
content: "/";
2626
}
2727

2828
*:root {
2929
--md-admonition-seealso-color: hsl(278, 100%, 63%);
30-
--md-eye--icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>');
30+
--md-admonition-icon--seealso: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>');
31+
--md-admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M5 13.18v2.81c0 .73.4 1.41 1.04 1.76l5 2.73c.6.33 1.32.33 1.92 0l5-2.73c.64-.35 1.04-1.03 1.04-1.76v-2.81l-6.04 3.3c-.6.33-1.32.33-1.92 0L5 13.18zm6.04-9.66l-8.43 4.6c-.69.38-.69 1.38 0 1.76l8.43 4.6c.6.33 1.32.33 1.92 0L21 10.09V16c0 .55.45 1 1 1s1-.45 1-1V9.59c0-.37-.2-.7-.52-.88l-9.52-5.19c-.6-.32-1.32-.32-1.92 0z"/></svg>');
3132
}
3233

3334
.admonition.seealso .admonition-title {
@@ -40,5 +41,40 @@
4041

4142
.md-typeset .admonition.seealso :is(.admonition-title, summary)::before {
4243
background-color: var(--md-admonition-seealso-color);
43-
mask-image: var(--md-eye--icon);
44+
mask-image: var(--md-admonition-icon--seealso);
45+
}
46+
47+
[data-md-color-scheme="default"] img.only-dark {
48+
display: none;
49+
}
50+
51+
[data-md-color-scheme="slate"] img.only-light {
52+
display: none;
53+
}
54+
55+
code.oh,
56+
a:hover code.oh,
57+
a code.oh {
58+
border-radius: 12px;
59+
padding: 2px 7px;
60+
color: white;
61+
font-size: 0.8rem;
62+
}
63+
64+
code.oh-red,
65+
a code.oh-red {
66+
background-color: hsl(14, 100%, 50%);
67+
}
68+
69+
code.oh-green {
70+
background-color: hsl(130, 65%, 57%);
71+
}
72+
73+
code.oh-blue,
74+
a code.oh-blue {
75+
background-color: hsl(207, 90%, 62%);
76+
}
77+
78+
a:hover code.oh-blue {
79+
background-color: hsl(207, 63%, 40%);
4480
}
7.29 KB
Loading
7.08 KB
Loading
3.95 KB
Loading
3.85 KB
Loading
4.14 KB
Loading
4.13 KB
Loading

0 commit comments

Comments
 (0)