diff --git a/docs/examples.rst b/docs/examples.rst index 511f915..2370bec 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -16,3 +16,13 @@ Show the MCP9808 to setup different temperature values .. literalinclude:: ../examples/mcp9808_temperature_limits.py :caption: examples/mcp9808_temperature_limits.py :linenos: + +MQTT with HomeAssistant +------------------------ + +python script to read mcp9808 temperature and publish it in mqtt. +Using discovery topic to create entity in Home Assistant. + +.. literalinclude:: ../examples/mcp9808_average_temp_mqtt.py + :caption: examples/mcp9808_average_temp_mqtt.py + :linenos: diff --git a/examples/mcp9808_temperature_limits.py b/examples/mcp9808_temperature_limits.py index 0f54080..90dba81 100644 --- a/examples/mcp9808_temperature_limits.py +++ b/examples/mcp9808_temperature_limits.py @@ -25,9 +25,9 @@ # Showing temperature Limits while True: - if mcp.below_lt: + if mcp.below_lower: print("too cold!") - if mcp.above_ut: + if mcp.above_upper: print("getting hot!") - if mcp.above_ct: + if mcp.above_critical: print("Above critical temp!")