Which id to use in the configuration of EraClean CWBS-01: "lambda: id(sw_ble_client).turn_off();"
mihsu81 opened this issue · 4 comments
mihsu81 commented
Hi @dentra,
Which id should be used in the configuration file for a EraClean CWBS-01 instead of sw_ble_client?
ota:
on_begin:
then:
- lambda: id(sw_ble_client).turn_off();
Using the name of the ESP32 device throws errors during compilation, and sw_ble_client is not recognised.
Thanks in advance for your help and for the awesome job. 😊
dentra commented
@mihsu81 this is optional, but if you wish, here is an additional config lines:
switch:
- platform: ble_client
id: sw_ble_client
ble_client_id: ble_client_deodorizer
name: cwbs01 enabled
mihsu81 commented
Thanks a lot @dentra. Works fine now.
This tells the ble_client component to connect to the CW-BS01, read the data and disconnect?
Wouldn't it be more appropriate to use a button component instead of a switch, or that can't be turned off in case of an ota update?