mirror of
https://github.com/esphome/esphome.git
synced 2025-11-19 16:25:50 +00:00
[ruff] Enable PERF rules and fix all violations (#9874)
This commit is contained in:
@@ -310,9 +310,7 @@ async def to_code(config):
|
||||
for conf in config.get(CONF_ON_BLE_ADVERTISE, []):
|
||||
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var)
|
||||
if CONF_MAC_ADDRESS in conf:
|
||||
addr_list = []
|
||||
for it in conf[CONF_MAC_ADDRESS]:
|
||||
addr_list.append(it.as_hex)
|
||||
addr_list = [it.as_hex for it in conf[CONF_MAC_ADDRESS]]
|
||||
cg.add(trigger.set_addresses(addr_list))
|
||||
await automation.build_automation(trigger, [(ESPBTDeviceConstRef, "x")], conf)
|
||||
for conf in config.get(CONF_ON_BLE_SERVICE_DATA_ADVERTISE, []):
|
||||
|
||||
Reference in New Issue
Block a user