Skip to content

Commit 8602c37

Browse files
committed
Add checks if mqtt is connected
1 parent 5804eca commit 8602c37

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

firmware/conf.d/mqtt_bambu_lan.yaml

-9
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,6 @@ mqtt:
4848
-----END CERTIFICATE-----
4949
clean_session: true
5050
enable_on_boot: false
51-
#TODO: set enable_on_boot to false once this is merged: https://github.com/esphome/esphome/pull/7716
52-
# script:
53-
# - id: check_mqtt_creds
54-
# then:
55-
# - lambda: |-
56-
# if (id(bambu_mqtt)->broker != "" && id(bambu_mqtt)->password != "" && id(bambu_serial_number) != "") {
57-
# ESP_LOGI("MQTT", "Enabling MQTT");
58-
# id(bambu_mqtt)->enable = true;
59-
# }
6051

6152
# text_sensor:
6253
# - platform: mqtt_subscribe

firmware/conf.d/pn532_rfid-ams.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pn532_spi:
6363
- if:
6464
condition:
6565
and:
66-
#TODO: Verify mqtt is connected
66+
- mqtt.connected
6767
- lambda: 'return id(filament_raw_data1).state != "";'
6868
- lambda: 'return id(filament_raw_data1).state != "{}";'
6969
- binary_sensor.is_on: rfid_reader_spi_1_tag_is_openspool
@@ -154,7 +154,7 @@ pn532_spi:
154154
- if:
155155
condition:
156156
and:
157-
#TODO: Verify mqtt is connected
157+
- mqtt.connected
158158
- lambda: 'return id(filament_raw_data2).state != "";'
159159
- lambda: 'return id(filament_raw_data2).state != "{}";'
160160
- binary_sensor.is_on: rfid_reader_spi_2_tag_is_openspool

firmware/conf.d/pn532_rfid-solo.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pn532_spi:
101101
- if:
102102
condition:
103103
and:
104-
#TODO: Verify mqtt is connected
104+
- mqtt.connected
105105
- lambda: 'return id(filament_raw_data0).state != "";'
106106
- lambda: 'return id(filament_raw_data0).state != "{}";'
107107
- binary_sensor.is_on: rfid_reader_spi_0_tag_is_openspool

hardware/OpenSpool.fzz

-58.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)