From b2c09d1faea2c53720adcc0e7091d82c6467cf1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Kluivingh?= Date: Tue, 27 Jul 2021 12:32:07 +0200 Subject: [PATCH] Added a manual integration for temperature sensor (#1036) --- docs/integrate/home_assistant.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/integrate/home_assistant.md b/docs/integrate/home_assistant.md index 50457c4..375408f 100644 --- a/docs/integrate/home_assistant.md +++ b/docs/integrate/home_assistant.md @@ -23,7 +23,7 @@ OMG will use the auto discovery functionality of home assistant to create gatewa ![](../img/OpenMQTTGateway_Home_Assistant_MQTT_discovery.png) ## Manual integration examples -From @123, @finity, @denniz03, @jrockstad, @anarchking +From @123, @finity, @denniz03, @jrockstad, @anarchking, @dkluivingh ### Door sensor ```yaml @@ -179,3 +179,19 @@ sensor: #timeout: #away_timeout: ``` + +### Temperature sensor + +```yaml +sensor: + - platform: mqtt + name: outdoor temp + state_topic: "home/OpenMQTTGateway/433toMQTT" + unit_of_measurement: '°C' + value_template: > + {% if value_json is defined and value_json.sensor == 125 %} + {{ value_json.tempc }} + {% else %} + {{ states('sensor.outdoor_temp') }} + {% endif %} +```