File tree 2 files changed +13
-3
lines changed 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -16,3 +16,13 @@ Show the MCP9808 to setup different temperature values
16
16
.. literalinclude :: ../examples/mcp9808_temperature_limits.py
17
17
:caption: examples/mcp9808_temperature_limits.py
18
18
:linenos:
19
+
20
+ MQTT with HomeAssistant
21
+ ------------------------
22
+
23
+ python script to read mcp9808 temperature and publish it in mqtt.
24
+ Using discovery topic to create entity in Home Assistant.
25
+
26
+ .. literalinclude :: ../examples/mcp9808_average_temp_mqtt.py
27
+ :caption: examples/mcp9808_average_temp_mqtt.py
28
+ :linenos:
Original file line number Diff line number Diff line change 25
25
26
26
# Showing temperature Limits
27
27
while True :
28
- if mcp .below_lt :
28
+ if mcp .below_lower :
29
29
print ("too cold!" )
30
- if mcp .above_ut :
30
+ if mcp .above_upper :
31
31
print ("getting hot!" )
32
- if mcp .above_ct :
32
+ if mcp .above_critical :
33
33
print ("Above critical temp!" )
You can’t perform that action at this time.
0 commit comments