here’s a sample template I feed into the main yaml…
############################################
# MODULE: iGrill 3 BLE Integration Template
# TYPE: Sensor + BLE Client
# CREATED: 2025-10-06
# AUTHOR: Soup (Steve Campbell)
#
# INPUTS:
# - MAC address (BLE)
# - Battery level (AA or docked)
# - Propane level (if docked)
# - Temperature probes 1–4
#
# OUTPUTS:
# - Connection status (binary + text)
# - Battery sensor (template)
# - Propane status (emoji + %)
# - Probe temps (raw + emoji summary)
#
# RUNTIME IMPACT:
# - BLE scan + 60s polling
# - 4 probe sensors + propane + battery
############################################
ble_client:
- mac_address: ${mac_address}
id: ${igrill_id}
on_connect:
then:
- binary_sensor.template.publish:
id: ${igrill_id}_connection
state: ON
on_disconnect:
then:
- binary_sensor.template.publish:
id: ${igrill_id}_connection
state: OFF
binary_sensor:
- platform: template
name: "${igrill_name} Connection"
id: ${igrill_id}_connection
device_class: connectivity
sensor:
- platform: igrill
ble_client_id: ${igrill_id}
update_interval: 60s
send_value_when_unplugged: true
unplugged_probe_value: 0
battery_level:
name: "${igrill_name} Battery"
id: ${igrill_id}_battery
propane_level:
name: "${igrill_name} Propane"
id: ${igrill_id}_propane
temperature_probe1:
name: "${igrill_name} Probe 1"
id: ${igrill_id}_probe1
temperature_probe2:
name: "${igrill_name} Probe 2"
id: ${igrill_id}_probe2
temperature_probe3:
name: "${igrill_name} Probe 3"
id: ${igrill_id}_probe3
temperature_probe4:
name: "${igrill_name} Probe 4"
id: ${igrill_id}_probe4
text_sensor:
- platform: template
name: "${igrill_name} MAC Address"
id: ${igrill_id}_mac
lambda: |-
return std::string("${mac_address}");
- platform: template
name: "${igrill_name} Probe Summary"
id: ${igrill_id}_summary
lambda: |-
if (!id(${igrill_id}_connection).state) {
return {"🔌 OFFLINE"};
}
auto format_probe = [](float temp) -> std::string {
if (temp <= 0.0) return "🧊";
if (temp < 100.0) return "🌡️ " + to_string((int)temp) + "°F";
return "🔥 " + to_string((int)temp) + "°F";
};
std::string p1 = format_probe(id(${igrill_id}_probe1).state);
std::string p2 = format_probe(id(${igrill_id}_probe2).state);
std::string p3 = format_probe(id(${igrill_id}_probe3).state);
std::string p4 = format_probe(id(${igrill_id}_probe4).state);
return "P1: " + p1 + " | P2: " + p2 + " | P3: " + p3 + " | P4: " + p4;