steriku
February 21, 2023, 2:29pm
1
Hey Everyone,
Is this a bug or am I doing something wrong? Both of these actions work individually but when I try to do them together the compile error is:
Failed config
esp32_ble_tracker: [source /config/esphome/esphome-master.yaml:39]
scan_parameters:
duration: 60s
active: False
on_ble_advertise:
-
Unable to find action with the name 'mac_address'.
esphome-master.yaml
esp32_ble_tracker:
scan_parameters:
duration: 60s
active: false
on_ble_advertise:
- mac_address: EB:82:34:XX:XX:XX
then:
- lambda: |-
std::string name = x.get_name();
if (esphome::str_startswith(name, "level:")) {
name.erase(0,7);
std::string value = esphome::str_until(name.c_str(), ' ');
id(propane_level_tank_1).publish_state(atof(value.c_str()));
}
- lambda: |-
parseAdvertisement(x);
I think you might either need to shuffle this in 4 spaces, or repeat the on_ble_advertise trigger?
- on_ble_advertise:
...
- on_ble_advertise:
...
steriku
February 27, 2023, 1:49am
3
Apparently you can’t do these together by design. Doesn’t sound like it will be a feature either.
opened 04:37PM - 21 Feb 23 UTC
### The problem
Both of these actions work individually but when I try to do th… em together it will not compile.
### Which version of ESPHome has the issue?
2023.2.3
### What type of installation are you using?
Home Assistant Add-on
### Which version of Home Assistant has the issue?
2023.2.5
### What platform are you using?
ESP32
### Board
nodemcu
### Component causing the issue
esp32_ble_tracker
### Example YAML snippet
```yaml
esp32_ble_tracker:
scan_parameters:
duration: 60s
active: false
on_ble_advertise:
- mac_address: EB:82:34:XX:XX:XX
then:
- lambda: |-
std::string name = x.get_name();
if (esphome::str_startswith(name, "level:")) {
name.erase(0,7);
std::string value = esphome::str_until(name.c_str(), ' ');
id(propane_level_tank_1).publish_state(atof(value.c_str()));
}
- lambda: |-
parseAdvertisement(x);
```
### Anything in the logs that might be useful for us?
```txt
Failed config
esp32_ble_tracker: [source /config/esphome/esphome-master.yaml:39]
scan_parameters:
duration: 60s
active: False
on_ble_advertise:
-
Unable to find action with the name 'mac_address'.
```
### Additional information
_No response_