def METHOD_NAME(mqttc, data, line):
    """Publish rtl_433 sensor data to MQTT."""
    # Construct a topic from the information that identifies which
    # device this frame is from.
    # NB: id is only used if channel is not present.
    path = MQTT_PREFIX
    if "model" in data:
        path += "/" + sanitize(data["model"])
    if "channel" in data:
        path += "/" + str(data["channel"])
    elif "id" in data:
        path += "/" + str(data["id"])
    # Publish some specific items on subtopics.
    if "battery_ok" in data:
        mqttc.publish(path + "/battery", data["battery_ok"])
    if "humidity" in data:
        mqttc.publish(path + "/humidity", data["humidity"])
    if "temperature_C" in data:
        mqttc.publish(path + "/temperature", data["temperature_C"])
    if "depth_cm" in data:
        mqttc.publish(path + "/depth", data["depth_cm"])
    # Publish the entire json string on the main topic.
    mqttc.publish(path, line)