1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 14:43:51 +00:00

Disable MQTT if not used (#373)

* Disable MQTT if not used

* Lint
This commit is contained in:
Otto Winter
2019-01-29 17:29:21 +01:00
committed by GitHub
parent 7b26ecc0dc
commit 176c712eeb
66 changed files with 389 additions and 530 deletions

View File

@@ -461,6 +461,17 @@ sensor:
- platform: wifi_signal
name: "WiFi Signal Sensor"
update_interval: 15s
- platform: mqtt_subscribe
name: "MQTT Subscribe Sensor 1"
topic: "mqtt/topic"
id: the_sensor
qos: 2
on_value:
- mqtt.publish_json:
topic: the/topic
payload: |-
root["key"] = id(the_sensor).value;
root["greeting"] = "Hello World";
esp32_touch:
@@ -1072,3 +1083,9 @@ globals:
type: std::string
restore_value: no
# initial_value: ""
text_sensor:
- platform: mqtt_subscribe
name: "MQTT Subscribe Text"
topic: "the/topic"
qos: 2

View File

@@ -24,12 +24,6 @@ ethernet:
hostname: helloworld
domain: .local
mqtt:
broker: '192.168.178.84'
port: 1883
username: 'debug'
password: 'debug'
api:
i2c:
@@ -82,17 +76,6 @@ sensor:
name: "Xiaomi MiJia Humidity"
battery_level:
name: "Xiaomi MiJia Battery Level"
- platform: mqtt_subscribe
name: "MQTT Subscribe Sensor 1"
topic: "mqtt/topic"
id: the_sensor
qos: 2
on_value:
- mqtt.publish_json:
topic: the/topic
payload: |-
root["key"] = id(the_sensor).value;
root["greeting"] = "Hello World";
- platform: pmsx003
type: PMSX003
pm_1_0:
@@ -204,10 +187,6 @@ text_sensor:
variables:
my_variable: |-
return id(version_sensor).state;
- platform: mqtt_subscribe
name: "MQTT Subscribe Text"
topic: "the/topic"
qos: 2
- platform: template
name: "Template Text Sensor"
lambda: |-